<?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: Case Study : ActionScript 3 Performance Optimization</title>
	<atom:link href="http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/</link>
	<description>code = joy</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:22:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ben Garney</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17226</link>
		<dc:creator>Ben Garney</dc:creator>
		<pubDate>Wed, 14 Oct 2009 07:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17226</guid>
		<description>Andre mentioned this, but what is the diff for release vs. debug player running this code? In my experience, you can see massive differences between the two.</description>
		<content:encoded><![CDATA[<p>Andre mentioned this, but what is the diff for release vs. debug player running this code? In my experience, you can see massive differences between the two.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikechambers</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17224</link>
		<dc:creator>mikechambers</dc:creator>
		<pubDate>Wed, 14 Oct 2009 02:52:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17224</guid>
		<description>@David

Yeah, you are right. Count is not needed at all. That was left over from the original code.

You could just len.

Good catch.

mike chambers

mesh@adobe.com</description>
		<content:encoded><![CDATA[<p>@David</p>
<p>Yeah, you are right. Count is not needed at all. That was left over from the original code.</p>
<p>You could just len.</p>
<p>Good catch.</p>
<p>mike chambers</p>
<p><a href="mailto:mesh@adobe.com">mesh@adobe.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wilhelm</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17222</link>
		<dc:creator>David Wilhelm</dc:creator>
		<pubDate>Wed, 14 Oct 2009 00:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17222</guid>
		<description>Do you really need the &#039;count&#039; variable at all? isn&#039;t it just duplicating &#039;len&#039; = pixels.length ? If so then you could remove one statement from the loop.</description>
		<content:encoded><![CDATA[<p>Do you really need the &#8216;count&#8217; variable at all? isn&#8217;t it just duplicating &#8216;len&#8217; = pixels.length ? If so then you could remove one statement from the loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renato Moya</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17221</link>
		<dc:creator>Renato Moya</dc:creator>
		<pubDate>Wed, 14 Oct 2009 00:19:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17221</guid>
		<description>Interesting post, Mike.

Well, I believe it would be essential that all these tricks to improve performance get done by the compiler for mobile applications ONLY.

I understand it sounds nuts writting instructions to the compiler to every single bad coding case in order to keep the code appearance and make life easier to developers.

I believe the flash team is doing a great job already by sharing these tricks, tips, tests, etc to the community, this is something we should learn, not to ask the compiler to do it for us.</description>
		<content:encoded><![CDATA[<p>Interesting post, Mike.</p>
<p>Well, I believe it would be essential that all these tricks to improve performance get done by the compiler for mobile applications ONLY.</p>
<p>I understand it sounds nuts writting instructions to the compiler to every single bad coding case in order to keep the code appearance and make life easier to developers.</p>
<p>I believe the flash team is doing a great job already by sharing these tricks, tips, tests, etc to the community, this is something we should learn, not to ask the compiler to do it for us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neon::pixel</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17214</link>
		<dc:creator>neon::pixel</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:41:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17214</guid>
		<description>Hello!
This can be a dumb question. If you&#039;re saying that &quot;Some operations are faster in DebugPlayer than ReleasePlayer&quot;! So how about using an external bebugger? Like Alcon maybe? Just asking :S</description>
		<content:encoded><![CDATA[<p>Hello!<br />
This can be a dumb question. If you&#8217;re saying that &#8220;Some operations are faster in DebugPlayer than ReleasePlayer&#8221;! So how about using an external bebugger? Like Alcon maybe? Just asking :S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre Michelle</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17213</link>
		<dc:creator>Andre Michelle</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:27:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17213</guid>
		<description>@Mike

&quot;However, I was trying to focus on improvements that I could make to the code today.&quot;

Yeah, that is our daily bread. Workaround the bad compiler. Spending a huge amount of time. I just wanted to point out, that a new compiler would make a difference in future for everybody, not just for cutting edge guys.

@everyone

Please vote &gt; http://bugs.adobe.com/jira/browse/ASC-3802</description>
		<content:encoded><![CDATA[<p>@Mike</p>
<p>&#8220;However, I was trying to focus on improvements that I could make to the code today.&#8221;</p>
<p>Yeah, that is our daily bread. Workaround the bad compiler. Spending a huge amount of time. I just wanted to point out, that a new compiler would make a difference in future for everybody, not just for cutting edge guys.</p>
<p>@everyone</p>
<p>Please vote &gt; <a href="http://bugs.adobe.com/jira/browse/ASC-3802" rel="nofollow">http://bugs.adobe.com/jira/browse/ASC-3802</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikechambers</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17212</link>
		<dc:creator>mikechambers</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:22:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17212</guid>
		<description>@Andre

Yes. I saw Joa&#039;s session at FOTB and Max, as well as met with him a couple of times about his work.

I, and the compiler team, are aware of the improvements that could be made in the compiler. However, I was trying to focus on improvements that I could make to the code today.

mike chambers

mesh@adobe.com</description>
		<content:encoded><![CDATA[<p>@Andre</p>
<p>Yes. I saw Joa&#8217;s session at FOTB and Max, as well as met with him a couple of times about his work.</p>
<p>I, and the compiler team, are aware of the improvements that could be made in the compiler. However, I was trying to focus on improvements that I could make to the code today.</p>
<p>mike chambers</p>
<p><a href="mailto:mesh@adobe.com">mesh@adobe.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre Michelle</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17211</link>
		<dc:creator>Andre Michelle</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17211</guid>
		<description>@Mike:

&quot;What types of improvements are you seeing?&quot;

Have you tried to test it the way I propose?

If you still don&#039;t get a big performance peak, I will try it tomorrow. Maybe things have change in the last update.</description>
		<content:encoded><![CDATA[<p>@Mike:</p>
<p>&#8220;What types of improvements are you seeing?&#8221;</p>
<p>Have you tried to test it the way I propose?</p>
<p>If you still don&#8217;t get a big performance peak, I will try it tomorrow. Maybe things have change in the last update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy Gilbert</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17210</link>
		<dc:creator>Troy Gilbert</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17210</guid>
		<description>@Mike: I&#039;m guessing the difference between for each and for is down to the &quot;proxy&quot; function call overhead? I would think this could be optimized-out by the compiler with a vector, but it wouldn&#039;t surprise me if it&#039;s not.

What I mean: when calling for each, the runtime is internally calling getNextName() (or whatever the proxy iterator function is) on the object. These would be unnecessary for direct indexing.</description>
		<content:encoded><![CDATA[<p>@Mike: I&#8217;m guessing the difference between for each and for is down to the &#8220;proxy&#8221; function call overhead? I would think this could be optimized-out by the compiler with a vector, but it wouldn&#8217;t surprise me if it&#8217;s not.</p>
<p>What I mean: when calling for each, the runtime is internally calling getNextName() (or whatever the proxy iterator function is) on the object. These would be unnecessary for direct indexing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre Michelle</title>
		<link>http://www.mikechambers.com/blog/2009/10/13/case-study-actionscript-3-performance-optimization/comment-page-1/#comment-17209</link>
		<dc:creator>Andre Michelle</dc:creator>
		<pubDate>Tue, 13 Oct 2009 18:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1865#comment-17209</guid>
		<description>&quot;In my case, the gains were not enough to justify making the code less readable.&quot;

Imagine you could do this:

Instead of
[red += pixel &gt;&gt; 16 &amp; 0xFF;]
you write
[red += pixel.getRed();]

That is readable code. A usual compiler would fix the optimization for you by inlining the code from the method call. That is what Joa is about to do in Apparat &gt; http://blog.joa-ebert.com/2009/08/11/apparat-is-now-open-source

We are so used to write optimized code, that we forgot how it could be. Not to mention bigger projects, where readability suffers when trying to make things fast. And not to forget Actioscript beginners, who have no clue at all, that optimization exists.</description>
		<content:encoded><![CDATA[<p>&#8220;In my case, the gains were not enough to justify making the code less readable.&#8221;</p>
<p>Imagine you could do this:</p>
<p>Instead of<br />
[red += pixel &gt;&gt; 16 &amp; 0xFF;]<br />
you write<br />
[red += pixel.getRed();]</p>
<p>That is readable code. A usual compiler would fix the optimization for you by inlining the code from the method call. That is what Joa is about to do in Apparat &gt; <a href="http://blog.joa-ebert.com/2009/08/11/apparat-is-now-open-source" rel="nofollow">http://blog.joa-ebert.com/2009/08/11/apparat-is-now-open-source</a></p>
<p>We are so used to write optimized code, that we forgot how it could be. Not to mention bigger projects, where readability suffers when trying to make things fast. And not to forget Actioscript beginners, who have no clue at all, that optimization exists.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
