<?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: Readfile vs Include, echo vs print; don&#8217;t bother</title>
	<atom:link href="http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 15:54:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-6578</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 23 Nov 2009 03:42:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-6578</guid>
		<description>thank you for the love letter :-)</description>
		<content:encoded><![CDATA[<p>thank you for the love letter <img src='http://www.raditha.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaimie Sirovich</title>
		<link>http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-6550</link>
		<dc:creator>Jaimie Sirovich</dc:creator>
		<pubDate>Sun, 22 Nov 2009 01:02:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-6550</guid>
		<description>Hahaha, this crap people post never ceases to amaze me.

The best part is the echo vs. print stuff was axed in deference to people noticing :)

If it&#039;s not in a loop or not recursive, it&#039;s probably not worth looking at.

A few things I&#039;ve also noticed:
Using references in PHP can actually slow things down.  Even I make this mistake because I&#039;m used to compiled languages that actually do what they&#039;re told.  I&#039;m not sure with respect to &quot;quasi-return by reference&quot; vs. return.  However, if it doesn&#039;t need to be a reference because you&#039;re not actually modifying it, *do not use reference passing.*  Doing so actually slows things down.  Why?  PHP won&#039;t copy it anyway if you don&#039;t modify it, so you&#039;re actually making it track/do more.  I didn&#039;t believe it at first ... but it makes sense.

Also.  &quot; vs. &#039;

Anyone who has looked at the PHP lexer knows that the interpolated variables are pulled out by the lexer itself.  Using a single quoted string vs. a double quoted string without variables will only speed things up to the extent that the lexer does not have to check for a variable.  This will not be measurable.  

I don&#039;t know why, but deep recursion may be a problem for PHP sometimes.  On the other hand, the function I&#039;m referring to is only anecdotal as was rewritten a far less stupid way :)

I think what bothers me most about php.net is seeing meaningless profiling/tests of things that don&#039;t matter.

Look at loops.  Look at a Donald Knuth book.  Seriously, no matter how much you optimize a bubblesort, it&#039;s still a bubblesort.

Consider this a love letter to cancel out the hate mail ;)</description>
		<content:encoded><![CDATA[<p>Hahaha, this crap people post never ceases to amaze me.</p>
<p>The best part is the echo vs. print stuff was axed in deference to people noticing <img src='http://www.raditha.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If it&#8217;s not in a loop or not recursive, it&#8217;s probably not worth looking at.</p>
<p>A few things I&#8217;ve also noticed:<br />
Using references in PHP can actually slow things down.  Even I make this mistake because I&#8217;m used to compiled languages that actually do what they&#8217;re told.  I&#8217;m not sure with respect to &#8220;quasi-return by reference&#8221; vs. return.  However, if it doesn&#8217;t need to be a reference because you&#8217;re not actually modifying it, *do not use reference passing.*  Doing so actually slows things down.  Why?  PHP won&#8217;t copy it anyway if you don&#8217;t modify it, so you&#8217;re actually making it track/do more.  I didn&#8217;t believe it at first &#8230; but it makes sense.</p>
<p>Also.  &#8221; vs. &#8216;</p>
<p>Anyone who has looked at the PHP lexer knows that the interpolated variables are pulled out by the lexer itself.  Using a single quoted string vs. a double quoted string without variables will only speed things up to the extent that the lexer does not have to check for a variable.  This will not be measurable.  </p>
<p>I don&#8217;t know why, but deep recursion may be a problem for PHP sometimes.  On the other hand, the function I&#8217;m referring to is only anecdotal as was rewritten a far less stupid way <img src='http://www.raditha.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I think what bothers me most about php.net is seeing meaningless profiling/tests of things that don&#8217;t matter.</p>
<p>Look at loops.  Look at a Donald Knuth book.  Seriously, no matter how much you optimize a bubblesort, it&#8217;s still a bubblesort.</p>
<p>Consider this a love letter to cancel out the hate mail <img src='http://www.raditha.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Site With The Lamp &#187; json_encode/json_decode vs serialize/unserialize and fools vs idiots.</title>
		<link>http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-3323</link>
		<dc:creator>Site With The Lamp &#187; json_encode/json_decode vs serialize/unserialize and fools vs idiots.</dc:creator>
		<pubDate>Sat, 01 Aug 2009 01:01:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-3323</guid>
		<description>[...] to figure out which is faster or takes up less memory you will never get anything done. Sometimes people who ought to know better even shout from the rooftops that you should waste your time trying to shave off a few milliseconds here and there but [...]</description>
		<content:encoded><![CDATA[<p>[...] to figure out which is faster or takes up less memory you will never get anything done. Sometimes people who ought to know better even shout from the rooftops that you should waste your time trying to shave off a few milliseconds here and there but [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-2828</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 29 Jun 2009 08:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-2828</guid>
		<description>It&#039;a amazing how such morons end up as team leaders - probably because they speak at a level that CEO and directors can understand.</description>
		<content:encoded><![CDATA[<p>It&#8217;a amazing how such morons end up as team leaders &#8211; probably because they speak at a level that CEO and directors can understand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: meaningful</title>
		<link>http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-2825</link>
		<dc:creator>meaningful</dc:creator>
		<pubDate>Mon, 29 Jun 2009 07:40:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.raditha.com/blog/archives/readfile-vs-include-echo-vs-print-dont-bother.html#comment-2825</guid>
		<description>seriously! some people just can&#039;t get it off their heads. they want to optimize optimize and optimize! some time back my senior was the same. he would have me write &quot;not OO code&quot; because he thought optimization(no setters/getters, use global fields!, less classes, methods..etc) is better than all the benefits of OO. after months of arguing and stuff. he is much better now.</description>
		<content:encoded><![CDATA[<p>seriously! some people just can&#8217;t get it off their heads. they want to optimize optimize and optimize! some time back my senior was the same. he would have me write &#8220;not OO code&#8221; because he thought optimization(no setters/getters, use global fields!, less classes, methods..etc) is better than all the benefits of OO. after months of arguing and stuff. he is much better now.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: www.raditha.com @ 2010-07-31 09:33:57 -->