<?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: For Vs. While</title>
	<atom:link href="http://jacksondunstan.com/articles/486/feed" rel="self" type="application/rss+xml" />
	<link>http://jacksondunstan.com/articles/486</link>
	<description>Mastering AS3</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:02:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/486/comment-page-1#comment-415</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Mon, 30 Nov 2009 18:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=486#comment-415</guid>
		<description>Thanks for the points!

1. Yes, I think they&#039;re wrong. :) If you look at the bytecodes available in AVM2 you&#039;ll see instructions like &quot;increment_i&quot;, &quot;inclocal_i&quot;, &quot;add_i&quot; and so forth. Adobe puts out a &lt;a href=&quot;http://www.adobe.com/devnet/actionscript/articles/avm2overview.pdf&quot; rel=&quot;nofollow&quot;&gt;good overview&lt;/a&gt;. There&#039;s no mention of &quot;pre&quot; and &quot;post&quot;; that is only an order of bytecode generation by the compiler based on the precedence rules of AS3. In the end it is the same bytecode. Still, that&#039;s something I could have been clearer about in the article.

2. My tests didn&#039;t show any difference between &quot;forward while&quot; and &quot;forward for&quot; for AS3. Do you see any difference when you don&#039;t swap the order around? How about when you use Flex instead of CS4? I&#039;m not seeing any difference when I swap any of the tests around.

3. This is good to know! I wonder what accounts for the mysterious slowness &quot;forward for&quot; on AS2...</description>
		<content:encoded><![CDATA[<p>Thanks for the points!</p>
<p>1. Yes, I think they&#8217;re wrong. :) If you look at the bytecodes available in AVM2 you&#8217;ll see instructions like &#8220;increment_i&#8221;, &#8220;inclocal_i&#8221;, &#8220;add_i&#8221; and so forth. Adobe puts out a <a href="http://www.adobe.com/devnet/actionscript/articles/avm2overview.pdf" rel="nofollow">good overview</a>. There&#8217;s no mention of &#8220;pre&#8221; and &#8220;post&#8221;; that is only an order of bytecode generation by the compiler based on the precedence rules of AS3. In the end it is the same bytecode. Still, that&#8217;s something I could have been clearer about in the article.</p>
<p>2. My tests didn&#8217;t show any difference between &#8220;forward while&#8221; and &#8220;forward for&#8221; for AS3. Do you see any difference when you don&#8217;t swap the order around? How about when you use Flex instead of CS4? I&#8217;m not seeing any difference when I swap any of the tests around.</p>
<p>3. This is good to know! I wonder what accounts for the mysterious slowness &#8220;forward for&#8221; on AS2&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Penner</title>
		<link>http://jacksondunstan.com/articles/486/comment-page-1#comment-414</link>
		<dc:creator>Robert Penner</dc:creator>
		<pubDate>Mon, 30 Nov 2009 17:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=486#comment-414</guid>
		<description>A few points:
1. Some people say there is a speed difference between pre-increment and post-increment. 

2. When I move the &quot;forward while&quot; code to the top, it runs slower than the &quot;forward for&quot; (AS3, Flash CS4). It often seems that code running first has a disadvantage.

3. I decompiled the loops; the for and while loops come back exactly the same (AS2 and AS3).</description>
		<content:encoded><![CDATA[<p>A few points:<br />
1. Some people say there is a speed difference between pre-increment and post-increment. </p>
<p>2. When I move the &#8220;forward while&#8221; code to the top, it runs slower than the &#8220;forward for&#8221; (AS3, Flash CS4). It often seems that code running first has a disadvantage.</p>
<p>3. I decompiled the loops; the for and while loops come back exactly the same (AS2 and AS3).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/486/comment-page-1#comment-411</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Fri, 27 Nov 2009 18:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=486#comment-411</guid>
		<description>That&#039;s the meaning of &lt;a href=&quot;http://en.wikipedia.org/wiki/Syntax_sugar&quot; rel=&quot;nofollow&quot;&gt;syntax sugar&lt;/a&gt;. Repeated testing (above) shows that this is, quite unfortunately, not the case.</description>
		<content:encoded><![CDATA[<p>That&#8217;s the meaning of <a href="http://en.wikipedia.org/wiki/Syntax_sugar" rel="nofollow">syntax sugar</a>. Repeated testing (above) shows that this is, quite unfortunately, not the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tommy Kjær Andersen</title>
		<link>http://jacksondunstan.com/articles/486/comment-page-1#comment-409</link>
		<dc:creator>Tommy Kjær Andersen</dc:creator>
		<pubDate>Fri, 27 Nov 2009 09:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=486#comment-409</guid>
		<description>if i remember rigth the for loops are converted to while loops by the compiler, so the results souldt be the same.</description>
		<content:encoded><![CDATA[<p>if i remember rigth the for loops are converted to while loops by the compiler, so the results souldt be the same.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
