<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.betabong.com &#187; speed</title>
	<atom:link href="http://blog.betabong.com/tag/speed/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.betabong.com</link>
	<description></description>
	<lastBuildDate>Thu, 13 May 2010 09:49:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Use GZip compression for your website</title>
		<link>http://blog.betabong.com/2010/03/25/use-gzip-compression-for-html-css-javascript-xml/</link>
		<comments>http://blog.betabong.com/2010/03/25/use-gzip-compression-for-html-css-javascript-xml/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 09:53:50 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Flash & more]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=316</guid>
		<description><![CDATA[Most of my Flash apps or websites use XML files, either for communication or initial data. They can get quite large, reaching about 100 kb or more is not seldom. You might say: so what?! 100 kb is like nothing for a bandwidth nowadays! Well, if you&#8217;ve every used iPhone tethering in an area where [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2009/03/05/javascript-canvas-3d/' rel='bookmark' title='Permanent Link: 3D Point Cloud with Javascript and Canvas'>3D Point Cloud with Javascript and Canvas</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Most of my Flash apps or websites use XML files, either for communication or initial data. They can get quite large, reaching about 100 kb or more is not seldom. You might say: so what?! 100 kb is like nothing for a bandwidth nowadays! Well, if you&#8217;ve every used iPhone tethering in an area where there is no 3g network, you start appreciating every single byte you won&#8217;t have to suck from the net. (On a side note: That&#8217;s when Opera really comes in handy.)</p>
<h3>XML files compress really well</h3>
<p>Because XML usually contains a lot of repetitive elements (noticably tags and attributes), they are like a compressor&#8217;s darling. Just zip a few of your XML files and you&#8217;ll see.</p>
<p>Now I kind of always thought that on nowadays webservers gzip compression is activated by default anyway. Which was wrong, at least for quite a bunch of servers I use.</p>
<h3>Activate GZip compression</h3>
<p>If your server installation contains the deflate module (which is the case for all of the ones I use), then you can simply add the following line to your .htaccess file:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># compress all html, plain text, xml, css and javascript:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript</pre></div></div>

<p>AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript</p>
<div>I&#8217;ve also tried more complex constructs found on the web, but they resulted in «Internal server errors» which is why I&#8217;ll go along with this simple one for now.</div>
<div><strong><span style="font-weight: normal;">The effects are dramatic! I usually get about 70% – 80% of reduction for non-minimized files, </span></strong></div>
<div>
<h3>Examples</h3>
</div>
<div>
<table border="0" class="small">
<tbody>
<tr>
<th></th>
<th>Uncompressed</th>
<th>Compressed</th>
<th>Reduction</th>
</tr>
<tr>
<td><strong>Javascript minimized</strong><br />
<a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js">MooTools YUI compressed</a></td>
<td>66,867</td>
<td>20,964</td>
<td>68.6%</td>
</tr>
<tr>
<td><strong>Javascript minimized</strong><br />
<a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools.jss">MooTools uncompressed</a></td>
<td>102,991</td>
<td>27,599</td>
<td>73.2%</td>
</tr>
<tr>
<td><strong>XML/CSS combined</strong><br />
<a href="http://www.ceylor.ch/pages/home.xml">A larger initial XML file for a Flash website of mine</a></td>
<td>84,316</td>
<td>18,229</td>
<td>78.4%</td>
</tr>
<tr>
<td><strong>XML/CSS combined</strong><br />
<a href="http://www.ceylor.ch/pages/home.xml">A larger initial XML file for a Flash website of mine</a></td>
<td>84,316</td>
<td>18,229</td>
<td>78.4%</td>
</tr>
<tr>
<td><strong>HTML</strong><br />
<a href="http://20min.ch">A swiss news website, 20 Minuten</a></td>
<td>148,587</td>
<td>29,385</td>
<td>80.2%</td>
</tr>
<tr>
<td><strong>HTML</strong><br />
<a href="http://blog.betabong.com">My blogs home page</a></td>
<td>51,638</td>
<td>12,991</td>
<td>74.8%</td>
</tr>
</tbody>
</table>
<h3>Tools</h3>
<p>If you want to test your website, these pages are very informative (first one is faster, second one more informative):</p>
<p><a href="http://www.whatsmyip.org/http_compression/">http://www.whatsmyip.org/http_compression/</a></div>
<p><a href="http://www.gidnetwork.com/tools/gzip-test.php">http://www.gidnetwork.com/tools/gzip-test.php</a></p>
<p>I also like this one, although it only gives you little info on content-encoding. But very much on top of that :-)<br />
<a href="http://www.wmtips.com/tools/info/">http://www.wmtips.com/tools/info/</a></p>
<p>This little Firefox addon will tell you wether any site you visit has GZip activated:<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/54647">https://addons.mozilla.org/en-US/firefox/addon/54647</a> (Content Encoding Detector)</p>
<h3 style="font-size: 1.17em;">Conclusion</h3>
<p>HTML websites will profit a lot from this compression, as well as Flash sites (if just for your swfobject.js) that use textual communication. And best of all: it won&#8217;t need any kungfu effort on your side! And: practically all browsers support it. (I&#8217;ve only heard of problems with IE6, but then, you know, f*** IE6)</p>
<h3>Update:</h3>
<p>A more complete solution for your .htaccess file:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;IfModule mod_deflate.c&gt;
	AddOutputFilterByType DEFLATE text/html
	AddOutputFilterByType DEFLATE text/xml
&nbsp;
	AddOutputFilterByType DEFLATE image/x-icon
&nbsp;
	AddOutputFilterByType DEFLATE text/css
&nbsp;
	AddOutputFilterByType DEFLATE text/javascript
	AddOutputFilterByType DEFLATE application/javascript
	AddOutputFilterByType DEFLATE application/x-javascript
	AddOutputFilterByType DEFLATE text/x-js
	AddOutputFilterByType DEFLATE text/ecmascript
	AddOutputFilterByType DEFLATE application/ecmascript
	AddOutputFilterByType DEFLATE text/vbscript
	AddOutputFilterByType DEFLATE text/fluffscript
&nbsp;
	AddOutputFilterByType DEFLATE image/svg+xml
	AddOutputFilterByType DEFLATE application/x-font-ttf
	AddOutputFilterByType DEFLATE application/x-font
	AddOutputFilterByType DEFLATE font/opentype
	AddOutputFilterByType DEFLATE font/otf
	AddOutputFilterByType DEFLATE font/ttf
	AddOutputFilterByType DEFLATE application/x-font-truetype
	AddOutputFilterByType DEFLATE application/x-font-opentype
	AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
	AddOutputFilterByType DEFLATE application/vnd.oasis.opendocument.formula-template
&lt;/IfModule&gt;</pre></div></div>

<p>(<a href="http://www.speedingupwebsite.com/2010/01/08/use-the-gzip-power/">Source</a>)</p>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2009/03/05/javascript-canvas-3d/' rel='bookmark' title='Permanent Link: 3D Point Cloud with Javascript and Canvas'>3D Point Cloud with Javascript and Canvas</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2010/03/25/use-gzip-compression-for-html-css-javascript-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Binary Fun &#8211; Bits in Bed with Actionscript</title>
		<link>http://blog.betabong.com/2009/09/22/binary-fun-bits-in-bed-with-actionscript/</link>
		<comments>http://blog.betabong.com/2009/09/22/binary-fun-bits-in-bed-with-actionscript/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 23:19:40 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=297</guid>
		<description><![CDATA[
I went down a few algorithmic roads recently, digging into path finding and – for some obscure reasons – bit manipulations. Or byte. Whatever.
Along this way some utility methods (or functions) were born, and I thought: May be some day some of them may be in use to any of you ;)
For my dear non-geeky [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2008/09/01/speed-parsing-string-in-as3/' rel='bookmark' title='Permanent Link: Simplicity follows Performance – parsing Strings in Actionscript 3'>Simplicity follows Performance – parsing Strings in Actionscript 3</a></li><li><a href='http://blog.betabong.com/2009/04/13/metatunnel-1k-demo-as-vs-js/' rel='bookmark' title='Permanent Link: Metatunnel 1k Demo: AS vs. JS'>Metatunnel 1k Demo: AS vs. JS</a></li><li><a href='http://blog.betabong.com/2008/09/26/weak-method-closure/' rel='bookmark' title='Permanent Link: Weak Method Closure'>Weak Method Closure</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.betabong.com/wp-content/uploads/2009/09/betabits.png" alt="betabits" title="betabits" width="503" height="191" class="alignright size-full wp-image-299" /></p>
<p>I went down a few algorithmic roads recently, digging into path finding and – for some obscure reasons – bit manipulations. Or byte. Whatever.</p>
<p>Along this way some utility methods (or functions) were born, and I thought: May be some day some of them may be in use to any of you ;)</p>
<p>For my dear non-geeky readers: A bit is the smallest part in software. It&#8217;s either this or that, either 0 or 1, either false or true. With a group of 2 bits you already have 4 states: 00, 01, 10 and 11. With 8 it&#8217;s 256 and so on (2^n).</p>
<p>As it would be too boring to just type 0 or 1, and because we have more than 2 fingers, man invented numbers to accumulate these bits: so 9 stands for 1001, and because 9 is shorter than 1001, we prefer 9. Some even write AB for 10101011, but that&#8217;s where we come back to geeky world.</p>
<p>So after this highly informative introduction, let&#8217;s get to some code. First, let&#8217;s count bits:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">static</span> <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> countBits<span style="color: #66cc66;">&#40;</span> value : uint <span style="color: #66cc66;">&#41;</span> : uint <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> count:uint = <span style="color: #cc66cc;">0</span>;
	<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>value<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> value <span style="color: #66cc66;">&amp;</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			count++;
		<span style="color: #66cc66;">&#125;</span>
		value <span style="color: #66cc66;">&gt;&gt;&gt;</span>= <span style="color: #cc66cc;">1</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">return</span> count;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Example:<br />
countBits( 0xAB ) -> 5</p>
<p>Now sometimes you might wanna know: Does this data contain no more than 1 bit? We could just ask countBits( value ) == 1. But that&#8217;s not as speedy as it should be, right? So here we go:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">static</span> <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> is_1_bit<span style="color: #66cc66;">&#40;</span> value : uint <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Boolean</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> count:uint = <span style="color: #cc66cc;">0</span>;
	<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>value<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> value <span style="color: #66cc66;">&amp;</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>count == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
			count++;
		<span style="color: #66cc66;">&#125;</span>
		value <span style="color: #66cc66;">&gt;&gt;&gt;</span>= <span style="color: #cc66cc;">1</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">return</span> count == <span style="color: #cc66cc;">1</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Examples:<br />
is_1_bit( 0xAB ) -> false<br />
is_1_bit( 0&#215;400 ) -> true</p>
<p>uint are by the way 32bit data, so a maximum of 32 of these bits we&#8217;re talking about can be turned on or off. That&#8217;s a lot of data. 4&#8242;294&#8242;967&#8242;296 combinations (though not that high compared to the numbers we read every day in the newspapers recently). Anyway, sometimes we might wanna access and set only a group of bits (usually 4 or 8) within this quite large row of bits:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">static</span> <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getBitGroup<span style="color: #66cc66;">&#40;</span> value : uint , group : uint , len : uint = <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">&#41;</span> : uint <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span> value <span style="color: #66cc66;">&gt;&gt;</span> <span style="color: #66cc66;">&#40;</span>group<span style="color: #66cc66;">*</span>len<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">%</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&lt;&lt;</span> len<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">static</span> <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setBitGroup<span style="color: #66cc66;">&#40;</span> value : uint , groupValue :uint , group : uint , len : uint = <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">&#41;</span> : uint <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> pos:uint = group <span style="color: #66cc66;">*</span> len;
	<span style="color: #000000; font-weight: bold;">var</span> mask:uint = n_bits<span style="color: #66cc66;">&#40;</span>pos<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> right_bits:uint = value <span style="color: #66cc66;">&amp;</span> mask;
	value <span style="color: #66cc66;">&gt;&gt;&gt;</span>= pos + len;
	value <span style="color: #66cc66;">&lt;&lt;</span>= len;
	value <span style="color: #66cc66;">|</span>= groupValue;
	value <span style="color: #66cc66;">&lt;&lt;</span>= pos;
	value <span style="color: #66cc66;">|</span>= right_bits;
	<span style="color: #b1b100;">return</span> value;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Don&#8217;t they look just groovy?! Yeah baby!</p>
<p>Anyway, that&#8217;s all for now. Stay tuned for some crazy path finding. If I find time (sometimes I wonder how all those bloggers find their time to write so much..) Not to mention Twitter. Boohaa.</p>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2008/09/01/speed-parsing-string-in-as3/' rel='bookmark' title='Permanent Link: Simplicity follows Performance – parsing Strings in Actionscript 3'>Simplicity follows Performance – parsing Strings in Actionscript 3</a></li><li><a href='http://blog.betabong.com/2009/04/13/metatunnel-1k-demo-as-vs-js/' rel='bookmark' title='Permanent Link: Metatunnel 1k Demo: AS vs. JS'>Metatunnel 1k Demo: AS vs. JS</a></li><li><a href='http://blog.betabong.com/2008/09/26/weak-method-closure/' rel='bookmark' title='Permanent Link: Weak Method Closure'>Weak Method Closure</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2009/09/22/binary-fun-bits-in-bed-with-actionscript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Switch Flash Browser Plugin on Mac OS X</title>
		<link>http://blog.betabong.com/2009/04/27/switch-flash-browser-plugin-mac/</link>
		<comments>http://blog.betabong.com/2009/04/27/switch-flash-browser-plugin-mac/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 13:12:35 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Flash & more]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=273</guid>
		<description><![CDATA[Sometimes you need to test your Flash stuff with different plugin versions. Even if you just want to run some performance tests, it is very useful to switch to the release player (see below for another example).
For windows there is a neat Firefox Plugin that makes switching quite a snap. On Mac there is one [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2009/04/05/flash-debug-speed/' rel='bookmark' title='Permanent Link: Flash Debug Speed'>Flash Debug Speed</a></li><li><a href='http://blog.betabong.com/2008/12/06/test-flex-throttled-simulate-download/' rel='bookmark' title='Permanent Link: Test Flex/Flash throttled (aka Simulate Download)'>Test Flex/Flash throttled (aka Simulate Download)</a></li><li><a href='http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/' rel='bookmark' title='Permanent Link: Flash Player 10 – I love speed'>Flash Player 10 – I love speed</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to test your Flash stuff with different plugin versions. Even if you just want to run some <a href="/2009/04/05/flash-debug-speed/">performance tests</a>, it is very useful to switch to the release player (see below for another example).</p>
<p>For <a href="http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php">windows there is a neat Firefox Plugin</a> that makes switching quite a snap. <a href="http://sephiroth.it/firefox/flash_switcher/">On Mac there is one too</a> – I haven&#8217;t tested it, but it&#8217;s supposed to work (though I&#8217;m not too sure about that when I read <a href="http://www.sephiroth.it/weblog/archives/2006/11/flash_switcher_for_osx.php#comments">these comments here</a>). Still I prefer to work with Safari and I kind of dislike the thought of starting Firefox to just switch Plugins.</p>
<p><a href="http://code.google.com/p/wspluginswitcher/" style="float: left; display: block; margin-right: 10pt; margin-bottom: 10pt;"><img src="http://blog.betabong.com/wp-content/uploads/2009/04/wspluginswitcher-icon.jpg" alt="wspluginswitcher-icon" title="wspluginswitcher-icon" width="128" height="128" class="alignleft size-full wp-image-274" /></a>Fortunately I&#8217;ve found another solution: <a href="http://code.google.com/p/wspluginswitcher/">WSPluginSwitcher</a>. This one comes as a Cocoa app and once configured (you really should <a href="http://code.google.com/p/wspluginswitcher/wiki/Setup">read this wiki page</a>), it works real well for me. Also they have <a href="http://code.google.com/p/wspluginswitcher/downloads/list">prepared plugin versions for you to download</a> (though the <a href="http://www.adobe.com/support/flashplayer/downloads.html">most recents</a> are missing, but no big deal really).</p>
<p>As for the speed tests, let me just give you another example (impressing enough for me to wanna switch players for real world testing).</p>
<p>In Debug Player:</p>
<pre>
method...................................................ttl ms...avg ms
tare [2]                                                      0     0.00
CSSFastParser                                               603   120.60
CSSRegExpParserFast                                         987   197.40
CSSRegExpParserFastAdvanced                                1457   291.40
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
</pre>
<p>In Release Player:</p>
<pre>
method...................................................ttl ms...avg ms
tare [2]                                                      0     0.00
CSSFastParser                                               354    70.80
CSSRegExpParserFast                                         972   194.40
CSSRegExpParserFastAdvanced                                1469   293.80
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
</pre>
<p>Both 10.0.22.87, and exported as release swf. Oh, and by the way tested with another useful tool from Grant Skinner: <a href="http://www.gskinner.com/blog/archives/2009/04/as3_performance.html">AS3 Performance Testing Harness</a>.</p>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2009/04/05/flash-debug-speed/' rel='bookmark' title='Permanent Link: Flash Debug Speed'>Flash Debug Speed</a></li><li><a href='http://blog.betabong.com/2008/12/06/test-flex-throttled-simulate-download/' rel='bookmark' title='Permanent Link: Test Flex/Flash throttled (aka Simulate Download)'>Test Flex/Flash throttled (aka Simulate Download)</a></li><li><a href='http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/' rel='bookmark' title='Permanent Link: Flash Player 10 – I love speed'>Flash Player 10 – I love speed</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2009/04/27/switch-flash-browser-plugin-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Debug Speed</title>
		<link>http://blog.betabong.com/2009/04/05/flash-debug-speed/</link>
		<comments>http://blog.betabong.com/2009/04/05/flash-debug-speed/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 00:49:46 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Flash & more]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=225</guid>
		<description><![CDATA[I did some speed tests today, comparing two string parsing methods. And I&#8217;ve made some very interesting discoveries: The execution speed between SWF compiled for debugging and those compiled without differs.
Ha! Okay, that&#8217;s not that much of news (even for me). But what astonishes me is how much this speed gap can be, especially when [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2009/04/27/switch-flash-browser-plugin-mac/' rel='bookmark' title='Permanent Link: Switch Flash Browser Plugin on Mac OS X'>Switch Flash Browser Plugin on Mac OS X</a></li><li><a href='http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/' rel='bookmark' title='Permanent Link: Flash Player 10 – I love speed'>Flash Player 10 – I love speed</a></li><li><a href='http://blog.betabong.com/2008/12/06/test-flex-throttled-simulate-download/' rel='bookmark' title='Permanent Link: Test Flex/Flash throttled (aka Simulate Download)'>Test Flex/Flash throttled (aka Simulate Download)</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>I did some speed tests today, comparing two string parsing methods. And I&#8217;ve made some very interesting discoveries: The execution speed between SWF compiled for debugging and those compiled without differs.</p>
<p>Ha! Okay, that&#8217;s not that much of news (even for me). But what astonishes me is how much this speed gap can be, especially when it comes to massive data calculations. I somehow always had a somewhat 20 percent speed decrease in mind (I was just presuming, me dumb). But for a 3d particle test we&#8217;re talking factor 8!!</p>
<p>Now this made me curious&#8230; so I&#8217;ve tested with Debug and Release Player both debug and release SWFs:</p>
<p><strong>Debug Player running Debug SWF</strong></p>
<p><strong><a href="http://blog.betabong.com/wp-content/uploads/2009/04/picture-11.png" rel="lightbox[225]"><img class="alignnone size-full wp-image-226" title="Flash Debug in Debug" src="http://blog.betabong.com/wp-content/uploads/2009/04/picture-11.png" alt="Flash Debug in Debug" width="428" height="185" /></a></strong></p>
<p><strong>Debug Player running Release SWF</strong></p>
<p><strong><a href="http://blog.betabong.com/wp-content/uploads/2009/04/picture-9.png" rel="lightbox[225]"><img class="alignnone size-full wp-image-227" title="Release in Debug" src="http://blog.betabong.com/wp-content/uploads/2009/04/picture-9.png" alt="Release in Debug" width="428" height="185" /></a></strong></p>
<p><strong>Release Player running Debug SWF</strong></p>
<p><strong><a href="http://blog.betabong.com/wp-content/uploads/2009/04/picture-12.png" rel="lightbox[225]"><img class="alignnone size-full wp-image-228" title="Debug in Release" src="http://blog.betabong.com/wp-content/uploads/2009/04/picture-12.png" alt="Debug in Release" width="427" height="181" /></a></strong></p>
<p><strong>Release Player running Release SWF</strong></p>
<p><strong><a href="http://blog.betabong.com/wp-content/uploads/2009/04/picture-13.png" rel="lightbox[225]"><img class="alignnone size-full wp-image-229" title="Release in Release" src="http://blog.betabong.com/wp-content/uploads/2009/04/picture-13.png" alt="Release in Release" width="427" height="185" /></a></strong></p>
<p><strong>A few conclusions:</strong></p>
<ul>
<li><strong>Never release a SWF file with debug code</strong> (or otherwise said: put only stuff online from bin-release, never bin-debug). Though common users won&#8217;t notice the speed decrease, your friendly flash developers may, at least if you&#8217;re app is somewhat cpu intensive. And of course: debug SWF are much bigger in size (just in case you give a fuck about flash devs ;-)</li>
<li><strong>Speed tests should be played in the release player.</strong> Why? After all, I wouldn&#8217;t care if the relation would stay the same. Usually you just need to know how much faster one thing is compared to the other one, so that would do it. But unfortunately the ratio won&#8217;t always be the same. In the above example the ration is 3.66 for debug and 2.92 for release. And it can differ muuuuch more.</li>
</ul>
<p>The last one bugs me quite a bit. It&#8217;s just a pain in the ass to export a release build each time you wanna compare performance. And it also means you can&#8217;t do quick&#8217;n'dirty trace outputs for the time result (not a biggy if you&#8217;re testing within a Flex project though).</p>
<p>So here we go with <strong>two wishes for Adobe</strong>:</p>
<ul>
<li>Let us quickly test release builds within Flex Builder (a simple command would do it – I thought it might be «Run Testapp» (instead of «Debug Testapp»), but that just doesn&#8217;t bring up the Debugger (and same speed)</li>
<li>An option to turn off debugging mode in Debug Player!!! That would solve almost all problems, and we could also use our Plugin for normal browsing without performance penalties (is this why Youtube eats so much cpu here?</li>
</ul>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2009/04/27/switch-flash-browser-plugin-mac/' rel='bookmark' title='Permanent Link: Switch Flash Browser Plugin on Mac OS X'>Switch Flash Browser Plugin on Mac OS X</a></li><li><a href='http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/' rel='bookmark' title='Permanent Link: Flash Player 10 – I love speed'>Flash Player 10 – I love speed</a></li><li><a href='http://blog.betabong.com/2008/12/06/test-flex-throttled-simulate-download/' rel='bookmark' title='Permanent Link: Test Flex/Flash throttled (aka Simulate Download)'>Test Flex/Flash throttled (aka Simulate Download)</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2009/04/05/flash-debug-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplicity follows Performance – parsing Strings in Actionscript 3</title>
		<link>http://blog.betabong.com/2008/09/01/speed-parsing-string-in-as3/</link>
		<comments>http://blog.betabong.com/2008/09/01/speed-parsing-string-in-as3/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 16:18:25 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=101</guid>
		<description><![CDATA[In my current project I do a lot of String parsing. Much a lot! And when it comes to do the same things many many times, performance will gain much from little details.
Let&#8217;s take the simplest parsing as an example. Converting a CSS like string &#8220;width: 100%; maxwidth: 500; fontface: Bold; gap: 10;&#8221; to an [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2009/09/22/binary-fun-bits-in-bed-with-actionscript/' rel='bookmark' title='Permanent Link: Binary Fun &#8211; Bits in Bed with Actionscript'>Binary Fun &#8211; Bits in Bed with Actionscript</a></li><li><a href='http://blog.betabong.com/2008/07/21/nested-inner-functions-can-be-evil/' rel='bookmark' title='Permanent Link: Nested inner functions can be evil'>Nested inner functions can be evil</a></li><li><a href='http://blog.betabong.com/2009/04/13/metatunnel-1k-demo-as-vs-js/' rel='bookmark' title='Permanent Link: Metatunnel 1k Demo: AS vs. JS'>Metatunnel 1k Demo: AS vs. JS</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>In my current project I do a lot of String parsing. Much a lot! And when it comes to do the same things many many times, performance will gain much from little details.</p>
<p>Let&#8217;s take the simplest parsing as an example. Converting a CSS like string <strong>&#8220;width: 100%; maxwidth: 500; fontface: Bold; gap: 10;&#8221;</strong> to an object <strong>{ width: &#8220;100%&#8221; , maxwidth: &#8220;500&#8243; , fontface: &#8220;Bold&#8221; , gap: &#8220;10&#8243; }</strong></p>
<p>Compare these two methods to achieve this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> simpleStringToObject_fast<span style="color: #66cc66;">&#40;</span> input : <span style="color: #0066CC;">String</span> , o : <span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Object</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> input == <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">||</span> <span style="color: #66cc66;">!</span><span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#40;</span>input<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> o;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> o == <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> o = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> cursor : <span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
	<span style="color: #000000; font-weight: bold;">var</span> found_key : <span style="color: #0066CC;">String</span>;
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">index</span> : <span style="color: #0066CC;">int</span>;
	<span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> found_key == <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">index</span> = input.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">':'</span> , cursor <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">index</span> <span style="color: #66cc66;">&amp;</span>gt;= <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> input.<span style="color: #0066CC;">charAt</span><span style="color: #66cc66;">&#40;</span>index-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">&#41;</span> index--;
				found_key = input.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span> cursor , <span style="color: #0066CC;">index</span> <span style="color: #66cc66;">&#41;</span>;
				cursor = <span style="color: #0066CC;">index</span> + <span style="color: #cc66cc;">1</span>;
				<span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> input.<span style="color: #0066CC;">charAt</span><span style="color: #66cc66;">&#40;</span>cursor<span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">&#41;</span> cursor++;
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">break</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">index</span> = input.<span style="color: #0066CC;">indexOf</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">';'</span> , cursor <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">index</span> <span style="color: #66cc66;">&amp;</span>gt;= <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> input.<span style="color: #0066CC;">charAt</span><span style="color: #66cc66;">&#40;</span>index-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">&#41;</span> index--;
				o<span style="color: #66cc66;">&#91;</span> found_key <span style="color: #66cc66;">&#93;</span> = input.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span> cursor , <span style="color: #0066CC;">index</span> <span style="color: #66cc66;">&#41;</span>;
				found_key = <span style="color: #000000; font-weight: bold;">null</span>;
				cursor = <span style="color: #0066CC;">index</span> + <span style="color: #cc66cc;">1</span>;
				<span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span> input.<span style="color: #0066CC;">charAt</span><span style="color: #66cc66;">&#40;</span>cursor<span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">' '</span> <span style="color: #66cc66;">&#41;</span> cursor++;
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
				o<span style="color: #66cc66;">&#91;</span> found_key <span style="color: #66cc66;">&#93;</span> = input.<span style="color: #0066CC;">substr</span><span style="color: #66cc66;">&#40;</span> cursor <span style="color: #66cc66;">&#41;</span>;
				<span style="color: #b1b100;">break</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> o;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> simpleStringToObject_slow<span style="color: #66cc66;">&#40;</span> input : <span style="color: #0066CC;">String</span> , o : <span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Object</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> input == <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">||</span> <span style="color: #66cc66;">!</span><span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#40;</span>input<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> o;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> o == <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> o = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;
&nbsp;
	input = input.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">' '</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">join</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// remove spaces</span>
	<span style="color: #000000; font-weight: bold;">var</span> a : <span style="color: #0066CC;">Array</span> = input.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">';'</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> pair : <span style="color: #0066CC;">Array</span>;
	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">0</span> ; i <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			o<span style="color: #66cc66;">&#91;</span> pair<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#93;</span> = pair<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #b1b100;">return</span> o;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The first one might look like some crap lacking any elegance and style, but it&#8217;s<strong> twice as fast</strong> as the second one! And hey, if you do this a million times, it can be 5 seconds instead of 10. Might not seem to be that much, but I think it&#8217;s certainly <strong>worth the extra coding</strong> :-)</p>
<p>(Update: I haven&#8217;t mentioned RegExp here, though it definitely deserves a mention. Thing is that Regular Expressions are just damned slow in Flash compared to String manipulations, especially with longer strings. This is kind of surprising because it&#8217;s implemented natively. But the implementation obviously isn&#8217;t too good performance wise. I hope to see improvements with F10, though haven&#8217;t read anything about it yet &#8211; and also haven&#8217;t tested yet with beta. This little article confirms my experience with RegExp: <a href="http://www.mischel.com/diary/2006/07/12.htm">With a file of 10,000 lines, the string version is still instantaneous, but the regular expression version takes about five seconds.  Even with 180,000 lines, the string version is immediate.  We gave up on the regular expression version after over five minutes..</a>)</p>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2009/09/22/binary-fun-bits-in-bed-with-actionscript/' rel='bookmark' title='Permanent Link: Binary Fun &#8211; Bits in Bed with Actionscript'>Binary Fun &#8211; Bits in Bed with Actionscript</a></li><li><a href='http://blog.betabong.com/2008/07/21/nested-inner-functions-can-be-evil/' rel='bookmark' title='Permanent Link: Nested inner functions can be evil'>Nested inner functions can be evil</a></li><li><a href='http://blog.betabong.com/2009/04/13/metatunnel-1k-demo-as-vs-js/' rel='bookmark' title='Permanent Link: Metatunnel 1k Demo: AS vs. JS'>Metatunnel 1k Demo: AS vs. JS</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/09/01/speed-parsing-string-in-as3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash Player 10 – I love speed</title>
		<link>http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/</link>
		<comments>http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 08:30:03 +0000</pubDate>
		<dc:creator>betabong</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash & more]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://blog.betabong.com/?p=77</guid>
		<description><![CDATA[So Flash Player 10 is on its way. Soon, very soon, we&#8217;ll be able to enjoy 3D effects on every other website, youhaa. While some are eagerly waiting for this or the enhanced drawing API, I&#8217;m very much looking forward to the speed enhancements.
Visual Speed
While Flash Player 9 or more precisely the underlying actionscript 3 [...]


Related posts:<ol><li><a href='http://blog.betabong.com/2009/04/05/flash-debug-speed/' rel='bookmark' title='Permanent Link: Flash Debug Speed'>Flash Debug Speed</a></li><li><a href='http://blog.betabong.com/2009/04/27/switch-flash-browser-plugin-mac/' rel='bookmark' title='Permanent Link: Switch Flash Browser Plugin on Mac OS X'>Switch Flash Browser Plugin on Mac OS X</a></li><li><a href='http://blog.betabong.com/2008/11/19/alchemy-release/' rel='bookmark' title='Permanent Link: Alchemy – THE cool new flash feature!'>Alchemy – THE cool new flash feature!</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-84" title="astro" src="http://blog.betabong.com/wp-content/uploads/2008/08/astro.jpg" alt="" width="150" height="164" style="margin-right:20px; margin-bottom:20px; float:left;"/>So Flash Player 10 is on its way. Soon, very soon, we&#8217;ll be able to enjoy 3D effects on every other website, youhaa. While some are eagerly waiting for this or the enhanced drawing API, I&#8217;m very much looking forward to the speed enhancements.</p>
<p>Visual Speed</p>
<p>While Flash Player 9 or more precisely the underlying actionscript 3 interpreter have lead to great speed enhancements on the logic side (meaning much faster data manipulation), it&#8217;s still rather slow when it comes to rendering. In a project I&#8217;m currently working on there&#8217;s quite some stuff going on here, but when I check speed performance with the Flex Profiler, most time is spent for rendering. Significant time. And it&#8217;s not some freaky Papervision 3D stuff ;)</p>
<p>So with Flash Player 10 this will be better. Adobe finally improves rendering speed, and the good thing is that every exisiting project (at least &gt;= f9, all?) will profit without republishing. I had done some little tests with a beta, and though I don&#8217;t remember the results, they looked quite promising (even on a Mac). I&#8217;m not sure though when they&#8217;re gonna use the graphic card to speed up – I don&#8217;t think it made use of that in my tests. Most people mention the hardware acceleration (some rendering tasks can be offloaded to your graphics card), but in my understanding the overhauled the entire rendering system, so everything and everyone should profit.</p>
<p>Vectors</p>
<p>Vectors are simply typed Arrays. A limited array. Ha! why would we want that?! For two reasons:</p>
<ul>
<li>Developers have more feedback while coding: the IDE will be able to tell you when you put some wrong stuff in an array – as for now you could mix whatever data in an array, the compiler wouldn&#8217;t complain. But above all, the IDE will be able to provide you help while typing: no more casting all the time to get to the methods of an array item!</li>
<li>Speed. A typed array can be much faster. And it will be.</li>
</ul>
<p>It looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> vector:Vector.<span style="color: #66cc66;">&amp;</span>lt;int<span style="color: #66cc66;">&amp;</span>gt; = <span style="color: #000000; font-weight: bold;">new</span> Vector.<span style="color: #66cc66;">&amp;</span>lt;int<span style="color: #66cc66;">&amp;</span>gt;<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>I&#8217;m not too much a fan of the definition syntax – something like this would look better, I think:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> vector:Vector::<span style="color: #0066CC;">int</span> = <span style="color: #000000; font-weight: bold;">new</span> Vector::<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// or</span>
<span style="color: #000000; font-weight: bold;">var</span> vector:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>But I haven&#8217;t thought of it much. Adobe certainly thought about it. Or some ECMA comittee. (Copy-pasting in Wordpress HTML mode also won&#8217;t work anymore.. pfff) Also I personally would have preferred not to have another class for that (just enhance the good old Array), but there are reasons for that too (backward compatibility, I guess, I can sing a song about that too). So anyway, I&#8217;m eagerly looking forward to use that stuff. I just love speed.</p>
<p>More infos here: <a title="Permanent Link to Using Vectors in ActionScript 3 and Flash Player 10" rel="bookmark" href="http://www.mikechambers.com/blog/2008/08/19/using-vectors-in-actionscript-3-and-flash-player-10/">Using Vectors in ActionScript 3 and Flash Player 10</a></p>
<p>Update: Ok, I can&#8217;t make to appear the new Vector syntax in Wordpress. Now I like the syntax even less ;-)</p>


<p>Related posts:<ol><li><a href='http://blog.betabong.com/2009/04/05/flash-debug-speed/' rel='bookmark' title='Permanent Link: Flash Debug Speed'>Flash Debug Speed</a></li><li><a href='http://blog.betabong.com/2009/04/27/switch-flash-browser-plugin-mac/' rel='bookmark' title='Permanent Link: Switch Flash Browser Plugin on Mac OS X'>Switch Flash Browser Plugin on Mac OS X</a></li><li><a href='http://blog.betabong.com/2008/11/19/alchemy-release/' rel='bookmark' title='Permanent Link: Alchemy – THE cool new flash feature!'>Alchemy – THE cool new flash feature!</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.betabong.com/2008/08/22/flash-player-10-i-love-speed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
