<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Even More Tips for faster PHP scripts</title>
	<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/</link>
	<description>About making the web a useful and interactive experience</description>
	<pubDate>Wed, 20 Aug 2008 11:29:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Giornale</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-9262</link>
		<dc:creator>Giornale</dc:creator>
		<pubDate>Sat, 02 Aug 2008 17:39:03 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-9262</guid>
		<description>thankss</description>
		<content:encoded><![CDATA[<p>thankss</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-5350</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 29 May 2008 15:38:13 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-5350</guid>
		<description>these optomizations are worthless unless you're getting more hits than Google, Yahoo, and YouTube combined.

How about some real optimizations to save some actual time, like making sure people know how to use data sctructures properly so they're not iterating over the same array more than once?</description>
		<content:encoded><![CDATA[<p>these optomizations are worthless unless you&#039;re getting more hits than Google, Yahoo, and YouTube combined.</p>
<p>How about some real optimizations to save some actual time, like making sure people know how to use data sctructures properly so they&#039;re not iterating over the same array more than once?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Consigli per script PHP più veloci</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-3996</link>
		<dc:creator>Consigli per script PHP più veloci</dc:creator>
		<pubDate>Tue, 29 Apr 2008 15:07:41 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-3996</guid>
		<description>[...] ho deciso di prendere spunto da tre articoli che trovai tempo fa su come ottimizzare la scrittura di codice PHP, verificare, e [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] ho deciso di prendere spunto da tre articoli che trovai tempo fa su come ottimizzare la scrittura di codice PHP, verificare, e [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dicas para um PHP mais veloz &#171; DUODRACO</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-3378</link>
		<dc:creator>Dicas para um PHP mais veloz &#171; DUODRACO</dc:creator>
		<pubDate>Sat, 12 Apr 2008 16:49:53 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-3378</guid>
		<description>[...] tips-for-faster-php-scripts more tips for faster php scripts even more tips for faster php script [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] tips-for-faster-php-scripts more tips for faster php scripts even more tips for faster php script [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Gilbert</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2896</link>
		<dc:creator>Jon Gilbert</dc:creator>
		<pubDate>Wed, 26 Mar 2008 08:56:01 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2896</guid>
		<description>Interesting series of articles, thnx. Some things are common knowledge (aren't they folks?), but a few tips in there which are surprising and handy. 
I cannot agree with Octopus that optimization is not important for php. The computing power required for a single page is usually low, but when working on high profile and high performance sites, optimization is crucial when hundreds of millions of requests are received on a dialy basis (see http://www.studivz.net/l/about_us/1/ - its in german, but maybe some readers can undertand it or at least put it through babelfish or google translate).
Best regards from Berlin.
Jon</description>
		<content:encoded><![CDATA[<p>Interesting series of articles, thnx. Some things are common knowledge (aren&#039;t they folks?), but a few tips in there which are surprising and handy.<br />
I cannot agree with Octopus that optimization is not important for php. The computing power required for a single page is usually low, but when working on high profile and high performance sites, optimization is crucial when hundreds of millions of requests are received on a dialy basis (see <a href="http://www.studivz.net/l/about_us/1/" rel="nofollow">http://www.studivz.net/l/about_us/1/</a> - its in german, but maybe some readers can undertand it or at least put it through babelfish or google translate).<br />
Best regards from Berlin.<br />
Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2698</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 10 Mar 2008 15:49:17 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2698</guid>
		<description>String manipulation is slow, but the alternative is often doing lots of little bits of output. What is faster ---
$a = '' ; $i = 100 ;
do { $a .= 'x'; $a .= 'x'; $a .= 'x'; $a .= 'x'; $a .= 'x'; } while (--$i &#62; 0) ;
echo $a, "\n" ;
--- or ---
$i = 100;
do { echo 'x'; echo 'x'; echo 'x'; echo 'x'; echo 'x'; } while (--$i &#62; 0) ;
echo "\n" ;
--- ?</description>
		<content:encoded><![CDATA[<p>String manipulation is slow, but the alternative is often doing lots of little bits of output. What is faster &#8212;<br />
$a = &#034; ; $i = 100 ;<br />
do { $a .= &#039;x&#039;; $a .= &#039;x&#039;; $a .= &#039;x&#039;; $a .= &#039;x&#039;; $a .= &#039;x&#039;; } while (&#8211;$i &gt; 0) ;<br />
echo $a, &#034;\n&#034; ;<br />
&#8212; or &#8212;<br />
$i = 100;<br />
do { echo &#039;x&#039;; echo &#039;x&#039;; echo &#039;x&#039;; echo &#039;x&#039;; echo &#039;x&#039;; } while (&#8211;$i &gt; 0) ;<br />
echo &#034;\n&#034; ;<br />
&#8212; ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: myme</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2174</link>
		<dc:creator>myme</dc:creator>
		<pubDate>Thu, 28 Feb 2008 14:06:24 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2174</guid>
		<description>@Rob Desbois
a == b ALWAYS converts all values into Integer, even both are Strings
The Code

if ((string)'0x10' == (string)'16') echo 'True'; else echo 'False';
echo ',';
if (strval('0x10') == strval('16')) echo 'True'; else echo 'False';

will result in "True,True"</description>
		<content:encoded><![CDATA[<p>@Rob Desbois<br />
a == b ALWAYS converts all values into Integer, even both are Strings<br />
The Code</p>
<p>if ((string)&#039;0&#215;10&#039; == (string)&#039;16&#039;) echo &#039;True&#039;; else echo &#039;False&#039;;<br />
echo &#039;,&#039;;<br />
if (strval(&#039;0&#215;10&#039;) == strval(&#039;16&#039;)) echo &#039;True&#039;; else echo &#039;False&#039;;</p>
<p>will result in &#034;True,True&#034;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: poste9</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2084</link>
		<dc:creator>poste9</dc:creator>
		<pubDate>Tue, 26 Feb 2008 14:05:32 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2084</guid>
		<description>Can u test what faster loop we could use?

while increasing, while decreasing, for, foreach...</description>
		<content:encoded><![CDATA[<p>Can u test what faster loop we could use?</p>
<p>while increasing, while decreasing, for, foreach&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Desbois</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2040</link>
		<dc:creator>Rob Desbois</dc:creator>
		<pubDate>Mon, 25 Feb 2008 17:39:26 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2040</guid>
		<description>My apologies -- brackets in last paragraph was meant to read (except #15); that's a good improvement I was unaware of :-)</description>
		<content:encoded><![CDATA[<p>My apologies &#8212; brackets in last paragraph was meant to read (except #15); that&#039;s a good improvement I was unaware of <img src='http://bitfilm.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Desbois</title>
		<link>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2031</link>
		<dc:creator>Rob Desbois</dc:creator>
		<pubDate>Mon, 25 Feb 2008 16:07:47 +0000</pubDate>
		<guid>http://bitfilm.net/2007/11/27/even-more-tips-for-faster-php-scripts/#comment-2031</guid>
		<description>Your reasoning for tip #14, "I guess that === is faster simply because it doesn't have to convert both sides to strings first.", is incorrect.
After compilation, if (a === b) will result in something like the following:
 1. if typeof(a) is not typeof(b) return false
 2. if a equals b return true

Similarly, if (a == b) will be something like:
 1. if typeof(a) is not typeof(b) goto 4
 2. if a equals b return true
 3. return false
 4. if typeof(a) is not string goto 8
 5. convert b to string and store in c
 6. if a equals c return true
 7. return false
 8. ...

Simply, the non-identity equality comparison operator will have to do *more* work as it must convert the types to values which can be compared directly.

Otherwise, interesting tips but the speedups (#15) are unnecessary; PHP isn't a suitable language (IMHO) for a job where 1E6 times when it's likely not called more than a few times in a script.</description>
		<content:encoded><![CDATA[<p>Your reasoning for tip #14, &#034;I guess that === is faster simply because it doesn&#039;t have to convert both sides to strings first.&#034;, is incorrect.<br />
After compilation, if (a === b) will result in something like the following:<br />
 1. if typeof(a) is not typeof(b) return false<br />
 2. if a equals b return true</p>
<p>Similarly, if (a == b) will be something like:<br />
 1. if typeof(a) is not typeof(b) goto 4<br />
 2. if a equals b return true<br />
 3. return false<br />
 4. if typeof(a) is not string goto 8<br />
 5. convert b to string and store in c<br />
 6. if a equals c return true<br />
 7. return false<br />
 8. &#8230;</p>
<p>Simply, the non-identity equality comparison operator will have to do *more* work as it must convert the types to values which can be compared directly.</p>
<p>Otherwise, interesting tips but the speedups (#15) are unnecessary; PHP isn&#039;t a suitable language (IMHO) for a job where 1E6 times when it&#039;s likely not called more than a few times in a script.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
