<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" 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/" > <channel><title>Comments on: FP10: Vector vs Array</title> <atom:link href="http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/feed/" rel="self" type="application/rss+xml" /><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/</link> <description>Web, Programing &#38; Design</description> <lastBuildDate>Sun, 02 Aug 2009 16:16:45 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: AJ</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-102</link> <dc:creator>AJ</dc:creator> <pubDate>Mon, 27 Apr 2009 21:04:07 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-102</guid> <description>I have submitted a JIRA bug for thishttps://bugs.adobe.com/jira/browse/FP-1802please vote and spread the word so this gets fixed!</description> <content:encoded><![CDATA[<p>I have submitted a JIRA bug for this</p><p><a href="https://bugs.adobe.com/jira/browse/FP-1802" rel="nofollow">https://bugs.adobe.com/jira/browse/FP-1802</a></p><p>please vote and spread the word so this gets fixed!</p> ]]></content:encoded> </item> <item><title>By: AJ</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-101</link> <dc:creator>AJ</dc:creator> <pubDate>Thu, 26 Mar 2009 18:38:54 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-101</guid> <description>Also I would like to note: the operator you use GREATLY affects your speeds, here&#039;s an example using PODs (uint):  (there is NO type casting in this at all)= 150:559  :  219:459vs.+= 147:592 : 834:459(code in the loops is the same as the last example, just in one test we&#039;re assigning to sum, in the other test we&#039;re adding to it)these are the performance numbers we expect from a strongly typed Vector vs. a normal Array as the compiler should be able to negate RTI (run-time type identification)Note: compiling against flex 3.3 and flex 4(most recent nightly) yielded no performance differences.</description> <content:encoded><![CDATA[<p>Also I would like to note: the operator you use GREATLY affects your speeds, here&#8217;s an example using PODs (uint):  (there is NO type casting in this at all)</p><p>=<br /> 150:559  :  219:459</p><p>vs.</p><p>+=<br /> 147:592 : 834:459</p><p>(code in the loops is the same as the last example, just in one test we&#8217;re assigning to sum, in the other test we&#8217;re adding to it)</p><p>these are the performance numbers we expect from a strongly typed Vector vs. a normal Array as the compiler should be able to negate RTI (run-time type identification)</p><p>Note: compiling against flex 3.3 and flex 4(most recent nightly) yielded no performance differences.</p> ]]></content:encoded> </item> <item><title>By: AJ</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-100</link> <dc:creator>AJ</dc:creator> <pubDate>Thu, 26 Mar 2009 17:40:40 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-100</guid> <description>Not sure if you figured it out yet, but I found that if I auto-completed vector in flexbuilder it added:import __AS3__.vec.Vector;with that I found that my vector was VERY slow if I didn&#039;t use a PODtick counts for processing an array of 10mill items first number set is vector, second is array first number is a normal forloop, second is for eachfor this test I casted the results for just the array forloop and left the vector naked:sum += vec_buff[i].foo;I made a small custom class that inherited from a small base class with a single public variable (foo)2552:1143 : 1512:1175as you can see a typed foreach loop is the same speed as an array, but a uncasted forloop is VERY slow.I did not experience this issue when I filled the arrays with PODs (uint for example)I just recently _removed_ that import, and am now getting numbers about the same speed as a casted array (slight, VERY slightly better) in the forloopsAlso note: easy way to detect if this is a problem, try to assign the vector element to an incorrect type, the imported version will NOT throw an error with strict type enabled, whereas the native version will (sum = vec_buff[i]; should throw an error but does not with imported version)I&#039;m using Flex 3.3 lastest stable build</description> <content:encoded><![CDATA[<p>Not sure if you figured it out yet, but I found that if I auto-completed vector in flexbuilder it added:</p><p>import __AS3__.vec.Vector;</p><p>with that I found that my vector was VERY slow if I didn&#8217;t use a POD</p><p>tick counts for processing an array of 10mill items<br /> first number set is vector, second is array<br /> first number is a normal forloop, second is for each</p><p>for this test I casted the results for just the array forloop and left the vector naked:</p><p>sum += vec_buff[i].foo;</p><p>I made a small custom class that inherited from a small base class with a single public variable (foo)</p><p>2552:1143 : 1512:1175</p><p>as you can see a typed foreach loop is the same speed as an array, but a uncasted forloop is VERY slow.</p><p>I did not experience this issue when I filled the arrays with PODs (uint for example)</p><p>I just recently _removed_ that import, and am now getting numbers about the same speed as a casted array (slight, VERY slightly better) in the forloops</p><p>Also note: easy way to detect if this is a problem, try to assign the vector element to an incorrect type, the imported version will NOT throw an error with strict type enabled, whereas the native version will (sum = vec_buff[i]; should throw an error but does not with imported version)</p><p>I&#8217;m using Flex 3.3 lastest stable build</p> ]]></content:encoded> </item> <item><title>By: Hannes Moser</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-99</link> <dc:creator>Hannes Moser</dc:creator> <pubDate>Wed, 18 Jun 2008 20:21:58 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-99</guid> <description>@Derek: Have a lookt at the test-file, there are several tests with primitives (read, write, simple maths), sometimes advantages, but little.</description> <content:encoded><![CDATA[<p>@Derek: Have a lookt at the test-file, there are several tests with primitives (read, write, simple maths), sometimes advantages, but little.</p> ]]></content:encoded> </item> <item><title>By: Derek Wischusen</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-98</link> <dc:creator>Derek Wischusen</dc:creator> <pubDate>Wed, 18 Jun 2008 18:20:56 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-98</guid> <description>Have you tried the test using primitives?Depending on what they are doing behind the scenes to create the the typed array, it could be that the only real performance benefit will occur when you use primitives.Derek</description> <content:encoded><![CDATA[<p>Have you tried the test using primitives?</p><p>Depending on what they are doing behind the scenes to create the the typed array, it could be that the only real performance benefit will occur when you use primitives.</p><p>Derek</p> ]]></content:encoded> </item> <item><title>By: Hannes Moser</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-97</link> <dc:creator>Hannes Moser</dc:creator> <pubDate>Wed, 18 Jun 2008 17:10:42 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-97</guid> <description>@jd: To be honest, i have no idea what is the right test for the &quot;Vector&quot;. In my opinion it&#039;s a &quot;typed&quot; array, or like a Generic, and so my conclusio was to test if an object-access to a Vector is faster than it is with an Array.Array -&gt; non-typed, has to be checked at runtime Vector -&gt; typed, faster, no check for typeI am happy enough, that i have a field which is typed now, but there was this little abstract about performance and Vector in the docs ;)</description> <content:encoded><![CDATA[<p>@jd: To be honest, i have no idea what is the right test for the &#8220;Vector&#8221;. In my opinion it&#8217;s a &#8220;typed&#8221; array, or like a Generic, and so my conclusio was to test if an object-access to a Vector is faster than it is with an Array.</p><p>Array -> non-typed, has to be checked at runtime<br /> Vector -> typed, faster, no check for type</p><p>I am happy enough, that i have a field which is typed now, but there was this little abstract about performance and Vector in the docs <img src='http://s-dovigo.com/content/hannes-moser/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: John Dowdell</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-96</link> <dc:creator>John Dowdell</dc:creator> <pubDate>Wed, 18 Jun 2008 16:42:23 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-96</guid> <description>I&#039;m not sure that an access call or a screen write would be the thing to benchmark here. I don&#039;t have non-public info on the vector type myself, but from reading it assumed it enabled a more parallel-like processing of data. But the references to it in the docs were oblique enough that I suspect we&#039;ll know much more by time of final release.Glad it piqued your interest, though. ;-)cu, jd/adobe</description> <content:encoded><![CDATA[<p>I&#8217;m not sure that an access call or a screen write would be the thing to benchmark here. I don&#8217;t have non-public info on the vector type myself, but from reading it assumed it enabled a more parallel-like processing of data. But the references to it in the docs were oblique enough that I suspect we&#8217;ll know much more by time of final release.</p><p>Glad it piqued your interest, though. <img src='http://s-dovigo.com/content/hannes-moser/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p><p>cu, jd/adobe</p> ]]></content:encoded> </item> <item><title>By: Hannes Moser</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-95</link> <dc:creator>Hannes Moser</dc:creator> <pubDate>Wed, 18 Jun 2008 15:40:38 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-95</guid> <description>I simply followed the instructions from the Adobe Flex SDK Wiki to compile.http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.xThe SWF was opened in Browser (FF 3). Are there any compiler-tags to produce release/environment swf for Flex? I have used a nightly build of the SDK from this week and compile it with &quot;mxlmc VectorSpeedFP10Test.as&quot;</description> <content:encoded><![CDATA[<p>I simply followed the instructions from the Adobe Flex SDK Wiki to compile.</p><p><a href="http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.x" rel="nofollow">http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.x</a></p><p>The SWF was opened in Browser (FF 3). Are there any compiler-tags to produce release/environment swf for Flex?<br /> I have used a nightly build of the SDK from this week and compile it with &#8220;mxlmc VectorSpeedFP10Test.as&#8221;</p> ]]></content:encoded> </item> <item><title>By: Danny</title><link>http://hannes-moser.com/blog/2008/06/fp10-vector-vs-array/comment-page-1/#comment-94</link> <dc:creator>Danny</dc:creator> <pubDate>Wed, 18 Jun 2008 15:32:08 +0000</pubDate> <guid isPermaLink="false">http://impossiblearts.com/blog/?p=379#comment-94</guid> <description>Are these results from work environment or release SWFs?</description> <content:encoded><![CDATA[<p>Are these results from work environment or release SWFs?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using disk: basic
Database Caching 1/12 queries in 0.003 seconds using apc
Object Caching 333/334 objects using apc
Content Delivery Network via s-dovigo.com/content/hannes-moser

Served from: hannes-moser.com @ 2012-02-10 08:45:41 -->
