<?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: Extreme JavaScript optimization</title>
	<atom:link href="http://www.phpied.com/extreme-javascript-optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpied.com/extreme-javascript-optimization/</link>
	<description>Stoyan&#039;s blog about &#60;a href=&#34;/category/xhtml&#34; class=&#34;tag-minor&#34;&#62;(x)html(5)&#60;/a&#62;, &#60;a href=&#34;/category/ajax&#34; class=&#34;tag-major&#34;&#62;ajax&#60;/a&#62;, &#60;a href=&#34;/category/bookmarklets&#34; class=&#34;tag-major&#34;&#62;bookmarklets&#60;/a&#62;, &#60;a href=&#34;/category/browsers&#34; class=&#34;tag-minor&#34;&#62;browsers&#60;/a&#62;, &#60;a href=&#34;/category/css&#34; class=&#34;tag-normal&#34;&#62;css&#60;/a&#62;, &#60;a href=&#34;/category/firebug&#34; class=&#34;tag-minor&#34;&#62;firebug&#60;/a&#62;, &#60;a href=&#34;/category/javascript&#34; class=&#34;tag-numero-uno&#34;&#62;javascript&#60;/a&#62;, &#60;a href=&#34;/category/json&#34; class=&#34;tag-normal&#34;&#62;json&#60;/a&#62;, &#60;a href=&#34;/category/mdb2&#34; class=&#34;tag-minor&#34;&#62;mdb2&#60;/a&#62;, &#60;a href=&#34;/category/mysql&#34; class=&#34;tag-normal&#34;&#62;mysql&#60;/a&#62;, &#60;a href=&#34;/category/pear&#34; class=&#34;tag-numero-uno&#34;&#62;pear&#60;/a&#62;, &#60;a href=&#34;/category/performance&#34; class=&#34;tag-major&#34;&#62;performance&#60;/a&#62;, &#60;a href=&#34;/category/php&#34; class=&#34;tag-numero-uno&#34;&#62;php&#60;/a&#62;, &#60;a href=&#34;/category/phpbb&#34; class=&#34;tag-major&#34;&#62;phpbb&#60;/a&#62;, &#60;a href=&#34;/category/tools&#34; class=&#34;tag-normal&#34;&#62;tools&#60;/a&#62;, &#60;a href=&#34;/category/yslow&#34; class=&#34;tag-minor&#34;&#62;yslow&#60;/a&#62;, &#60;a href=&#34;/category/yui&#34; class=&#34;tag-normal&#34;&#62;yui&#60;/a&#62;, &#60;a href=&#34;/category/writing&#34; class=&#34;tag-minor&#34;&#62;writing&#60;/a&#62;, &#60;a href=&#34;/category/music&#34; class=&#34;tag-major&#34;&#62;music&#60;/a&#62;,... &#60;a href=&#34;/category/life-and-everything&#34; class=&#34;tag-normal&#34;&#62;life and everything&#60;/a&#62;.</description>
	<lastBuildDate>Sat, 11 Feb 2012 14:07:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Por uma Web mais rápida: 26 técnicas de otimização de Sites &#171; Cândido Sales Blog</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-78671</link>
		<dc:creator>Por uma Web mais rápida: 26 técnicas de otimização de Sites &#171; Cândido Sales Blog</dc:creator>
		<pubDate>Mon, 12 Sep 2011 18:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-78671</guid>
		<description>[...] a performance. Usar iframes em excesso então é um quase um crime. E há também as práticas de otimização de código e lógica JavaScript, como quebrar longas tarefas em pedaços menores com WebWorkers ou setTimeout, evitando bloqueio da [...]</description>
		<content:encoded><![CDATA[<p>[...] a performance. Usar iframes em excesso então é um quase um crime. E há também as práticas de otimização de código e lógica JavaScript, como quebrar longas tarefas em pedaços menores com WebWorkers ou setTimeout, evitando bloqueio da [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garth Henson</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-73985</link>
		<dc:creator>Garth Henson</dc:creator>
		<pubDate>Thu, 02 Sep 2010 18:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-73985</guid>
		<description>Ugh. Code above should be (hopefully works this time):
&lt;code&gt;var i = 1, j = 1;&lt;/code&gt;
&lt;code&gt;alert([i, i++, i].join(&#039;,&#039;));&lt;/code&gt;
&lt;code&gt;alert([j, ++j, j].join(&#039;,&#039;));&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Ugh. Code above should be (hopefully works this time):<br />
<code>var i = 1, j = 1;</code><br />
<code>alert([i, i++, i].join(','));</code><br />
<code>alert([j, ++j, j].join(','));</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garth Henson</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-73984</link>
		<dc:creator>Garth Henson</dc:creator>
		<pubDate>Thu, 02 Sep 2010 18:22:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-73984</guid>
		<description>Ara, great work, as usual. Appreciate the simplistic yet profitable approach to optimization. I have been playing with the recommended process and benchmarking to see just how much things can speed up, and when combined, there is up to a 15-20% performance increase when you get up into the millions of iterations.

@Florent, you also have to be careful about simply switching the increment and decrement order dependent upon what you want your code to do. If you want the value to be evaluated BEFORE the increment/decrement is performed, you need to keep it after the variable name. Consider the following for an example:

var i = 1, j = 1;
alert([i, i++, i].join(&#039;,&#039;));
alert([j, ++j, j].join(&#039;,&#039;));


In this sample, the first will output 1,1,2 while the second will produce 1,2,2. Changing the order of the operator will change the evaluation order of the value as well. Switching this in code can very quickly become a hazard unless you are certain what the intended outcome is.</description>
		<content:encoded><![CDATA[<p>Ara, great work, as usual. Appreciate the simplistic yet profitable approach to optimization. I have been playing with the recommended process and benchmarking to see just how much things can speed up, and when combined, there is up to a 15-20% performance increase when you get up into the millions of iterations.</p>
<p>@Florent, you also have to be careful about simply switching the increment and decrement order dependent upon what you want your code to do. If you want the value to be evaluated BEFORE the increment/decrement is performed, you need to keep it after the variable name. Consider the following for an example:</p>
<p>var i = 1, j = 1;<br />
alert([i, i++, i].join(&#8216;,&#8217;));<br />
alert([j, ++j, j].join(&#8216;,&#8217;));</p>
<p>In this sample, the first will output 1,1,2 while the second will produce 1,2,2. Changing the order of the operator will change the evaluation order of the value as well. Switching this in code can very quickly become a hazard unless you are certain what the intended outcome is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahesh</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-73951</link>
		<dc:creator>Mahesh</dc:creator>
		<pubDate>Thu, 26 Aug 2010 14:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-73951</guid>
		<description>Thanks for simplified instruction for JavaScript optimization. I am now more enthused to devote time and learn these techniques.</description>
		<content:encoded><![CDATA[<p>Thanks for simplified instruction for JavaScript optimization. I am now more enthused to devote time and learn these techniques.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Huang Xinhao</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-72901</link>
		<dc:creator>Huang Xinhao</dc:creator>
		<pubDate>Thu, 13 May 2010 06:37:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-72901</guid>
		<description>Are these impove necessary for a normal website?</description>
		<content:encoded><![CDATA[<p>Are these impove necessary for a normal website?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-72524</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sun, 21 Mar 2010 19:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-72524</guid>
		<description>I&#039;ve done some messing about with this concept of the loop using a for loop and found that regardless of whether I define i (i.e. var i =0;) with the var keyword or not it still creates an i global variable that is also manipulated with the for loop. This was surprising to see and it contradicts everything I read about it being made a local variable in this case. I checked it over many times to make sure I didn&#039;t a mistake but this is the case. This means that the interpreter goes outside of the loop every time it has to change the value of i. How do you handle this?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve done some messing about with this concept of the loop using a for loop and found that regardless of whether I define i (i.e. var i =0;) with the var keyword or not it still creates an i global variable that is also manipulated with the for loop. This was surprising to see and it contradicts everything I read about it being made a local variable in this case. I checked it over many times to make sure I didn&#8217;t a mistake but this is the case. This means that the interpreter goes outside of the loop every time it has to change the value of i. How do you handle this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wynand</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-72328</link>
		<dc:creator>Wynand</dc:creator>
		<pubDate>Mon, 22 Feb 2010 20:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-72328</guid>
		<description>Great post!</description>
		<content:encoded><![CDATA[<p>Great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AlvaroG</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-72153</link>
		<dc:creator>AlvaroG</dc:creator>
		<pubDate>Wed, 13 Jan 2010 16:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-72153</guid>
		<description>it doesn&#039;t matter the dummy example, just use it if you&#039;ve a loop with hard data manipulation inside, i use this extreme optimization with an average of 400 object instances and it works perfectly reducing the exec time from 10secs to 1 second or less time, remember it&#039;s &quot;extreme optimization&quot; not &quot;extreme optimization for dummies&quot;, don&#039;t feed the troll.

If you want to reduce the script time execution (with hard to read code) use this, it&#039;s a optimization for execution not for reading.

Good posts!</description>
		<content:encoded><![CDATA[<p>it doesn&#8217;t matter the dummy example, just use it if you&#8217;ve a loop with hard data manipulation inside, i use this extreme optimization with an average of 400 object instances and it works perfectly reducing the exec time from 10secs to 1 second or less time, remember it&#8217;s &#8220;extreme optimization&#8221; not &#8220;extreme optimization for dummies&#8221;, don&#8217;t feed the troll.</p>
<p>If you want to reduce the script time execution (with hard to read code) use this, it&#8217;s a optimization for execution not for reading.</p>
<p>Good posts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Tellis</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-72100</link>
		<dc:creator>Philip Tellis</dc:creator>
		<pubDate>Thu, 31 Dec 2009 09:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-72100</guid>
		<description>@Florent: profile your code before deciding whether to use &lt;code&gt;--i&lt;/code&gt; or &lt;code&gt;i--&lt;/code&gt;.  This is true even in C.  Modern compilers are pretty smart.</description>
		<content:encoded><![CDATA[<p>@Florent: profile your code before deciding whether to use <code>--i</code> or <code>i--</code>.  This is true even in C.  Modern compilers are pretty smart.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Florent Vaucelle</title>
		<link>http://www.phpied.com/extreme-javascript-optimization/#comment-72089</link>
		<dc:creator>Florent Vaucelle</dc:creator>
		<pubDate>Mon, 28 Dec 2009 10:27:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/?p=1236#comment-72089</guid>
		<description>@jsq, thanks for the answer!
I try hard not to forget semicolons, but sometimes some escape... ;)</description>
		<content:encoded><![CDATA[<p>@jsq, thanks for the answer!<br />
I try hard not to forget semicolons, but sometimes some escape&#8230; <img src='http://www.phpied.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

