<?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"
	>
<channel>
	<title>Comments on: OOP and Performance</title>
	<atom:link href="http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<pubDate>Mon, 01 Dec 2008 20:04:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Martin</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-520478</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Wed, 28 Nov 2007 11:49:26 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-520478</guid>
		<description>&lt;strong&gt;Good input!&lt;/strong&gt;

I think the biggest problem with the procedural way is that it can get so messy - where's that variable, did I declare that, where was that again...Maybe I am just a mess, but OOP provides nice abstraction and handling of data AND is neat and tidy. You can say that you have an elephants memory and all, keeping multiple pages in your head but come back a week or a month later and it be all scrambled for you. OOP on the other hand will get you working in no time. Basically what it boils down to is that human beings are OOP not procedural and so it goes. 

Of course there's the bad messy programmer and good tidy programmer and then there's Murphy's Law.</description>
		<content:encoded><![CDATA[<p><strong>Good input!</strong></p>
<p>I think the biggest problem with the procedural way is that it can get so messy - where&#8217;s that variable, did I declare that, where was that again&#8230;Maybe I am just a mess, but OOP provides nice abstraction and handling of data AND is neat and tidy. You can say that you have an elephants memory and all, keeping multiple pages in your head but come back a week or a month later and it be all scrambled for you. OOP on the other hand will get you working in no time. Basically what it boils down to is that human beings are OOP not procedural and so it goes. </p>
<p>Of course there&#8217;s the bad messy programmer and good tidy programmer and then there&#8217;s Murphy&#8217;s Law.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: SitePoint Blogs &#187; Brion Vibber on Wikipedia and Mediawiki</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-25345</link>
		<dc:creator>SitePoint Blogs &#187; Brion Vibber on Wikipedia and Mediawiki</dc:creator>
		<pubDate>Mon, 22 May 2006 21:58:31 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-25345</guid>
		<description>[...] First up is his talk to Google, delever at the end of last month. Some fascinating details and trivia in there (e.g. they&#8217;re currently averaging about 1 update / sec) and, considering they &#8220;only&#8221; have about 100 application servers (running the mediawiki code), the overall impression is almost &#8220;is that all it takes? How small the Internet is&#8221;&#8212;Brion plays down the effort that has gone into making it possible with remarks like &#8220;It takes a little work&#8221;. He also mentions some of the issues they&#8217;re having with their wiki syntax parser, which has similar issues to those we&#8217;ve seen before elsewhere&#8212;they seem to be attempting to replace it with a C-based parser exposed as a PHP extension but given the date of last change, is that an effort which has stalled? Also, wryly noted, was the number of questions related to how wikimedia is financed&#8212;given it was a technical talk and the location, makes you go &#8220;Hmmmm&#8230;&#8221;. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] First up is his talk to Google, delever at the end of last month. Some fascinating details and trivia in there (e.g. they&#8217;re currently averaging about 1 update / sec) and, considering they &#8220;only&#8221; have about 100 application servers (running the mediawiki code), the overall impression is almost &#8220;is that all it takes? How small the Internet is&#8221;&#8212;Brion plays down the effort that has gone into making it possible with remarks like &#8220;It takes a little work&#8221;. He also mentions some of the issues they&#8217;re having with their wiki syntax parser, which has similar issues to those we&#8217;ve seen before elsewhere&#8212;they seem to be attempting to replace it with a C-based parser exposed as a PHP extension but given the date of last change, is that an effort which has stalled? Also, wryly noted, was the number of questions related to how wikimedia is financed&#8212;given it was a technical talk and the location, makes you go &#8220;Hmmmm&#8230;&#8221;. [&#8230;]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ren</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1711</link>
		<dc:creator>Ren</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1711</guid>
		<description>&lt;p&gt;&lt;br /&gt;
Would be nice for a PHP flavoured version of &lt;a href="re2c"&gt;re2c&lt;/a&gt;. Unfortunately made more difficult by the absence of a goto in PHP still, which I personally dont understand why it is such an issue, as it makes code generators a little simpler to implement/port. &lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>
Would be nice for a PHP flavoured version of <a href="re2c">re2c</a>. Unfortunately made more difficult by the absence of a goto in PHP still, which I personally dont understand why it is such an issue, as it makes code generators a little simpler to implement/port. </p>]]></content:encoded>
	</item>
	<item>
		<title>By: HarryF</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1712</link>
		<dc:creator>HarryF</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1712</guid>
		<description>&lt;p&gt;You sparked an interesting trailing of searching, by mentioning re2c, which end up on a different tack: &lt;a href="http://storm.cs.unipi.gr/~anakreon/aspa.html"&gt;ASPA&lt;/a&gt; - this is another ASP (VBScript / JScript) to PHP converter but looks to be pretty powerful - see the example the author provides &lt;a href="http://www.antlr.org:8080/pipermail/antlr-interest/2004-November/010349.html"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>You sparked an interesting trailing of searching, by mentioning re2c, which end up on a different tack: <a href="http://storm.cs.unipi.gr/~anakreon/aspa.html">ASPA</a> - this is another ASP (VBScript / JScript) to PHP converter but looks to be pretty powerful - see the example the author provides <a href="http://www.antlr.org:8080/pipermail/antlr-interest/2004-November/010349.html">here</a>.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: wont</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1713</link>
		<dc:creator>wont</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1713</guid>
		<description>&lt;p&gt;Was thinking when you talked about the whole dataset example that, if I were to do it procedurally, I would have passed in by reference all the desired results variables in the parameters to one function call, and done the calculations in one loop, similarly to how you did it in the OOP code. This is what I did on one project I was working on a few years back that had to handle multiple similar calculations on a large dataset. My original code had broken it out, but performance was horrible. After refactoring it, I got a sizable increase in processing speed.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Was thinking when you talked about the whole dataset example that, if I were to do it procedurally, I would have passed in by reference all the desired results variables in the parameters to one function call, and done the calculations in one loop, similarly to how you did it in the OOP code. This is what I did on one project I was working on a few years back that had to handle multiple similar calculations on a large dataset. My original code had broken it out, but performance was horrible. After refactoring it, I got a sizable increase in processing speed.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Thompson</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1714</link>
		<dc:creator>Christopher Thompson</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1714</guid>
		<description>&lt;p&gt;I think articles like this almost do OOP a disservice. You are comparing algorithms to methodologies in most of your cases which makes any conclusion impossible. Issues like abstraction, single vs multi pass, code comprehendablity, etc. are all issues of programming in general. But they often seem to slip into pro-OOP writing as unique to OOP. &lt;/p&gt;

&lt;p&gt;Somebody writes an informative article that basically says "even though OOP code executes slower you should use it anyway" and OOPifiles get all bent out of shape. &lt;/p&gt;

&lt;p&gt;Otherwise this was an interesting post on performance tuning. &lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>I think articles like this almost do OOP a disservice. You are comparing algorithms to methodologies in most of your cases which makes any conclusion impossible. Issues like abstraction, single vs multi pass, code comprehendablity, etc. are all issues of programming in general. But they often seem to slip into pro-OOP writing as unique to OOP. </p>
<p>Somebody writes an informative article that basically says &#8220;even though OOP code executes slower you should use it anyway&#8221; and OOPifiles get all bent out of shape. </p>
<p>Otherwise this was an interesting post on performance tuning. </p>]]></content:encoded>
	</item>
	<item>
		<title>By: HarryF</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1715</link>
		<dc:creator>HarryF</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1715</guid>
		<description>&lt;p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;
You are comparing algorithms to methodologies in most of your cases which makes any conclusion impossible.&lt;br /&gt;
&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Agreed, especially with"makes any conclusion impossible". Keeping focused on PHP, the assumption that "OO =&gt; slow app" is particularily acute, which I was attempting to question. Or perhaps what I was challenging was the reverse: procedural "PHP =&gt; fast app".&lt;/p&gt;

&lt;p&gt;Talking purely in terms of end results, the untestable experiment I'm trying to suggest is if we gave two, equally talented, developers a problem to solve of significant complexity &lt;i&gt;using PHP&lt;/i&gt;, the developer that applies OO is more likely to deliver something that performs well and scales consistently. And that's &lt;i&gt;not&lt;/i&gt; a direct result of OO directly but rather "side effects" that arise from the human side of development.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>
<blockquote>
<p>
You are comparing algorithms to methodologies in most of your cases which makes any conclusion impossible.
</p>
</blockquote>
</p><p>Agreed, especially with&#8221;makes any conclusion impossible&#8221;. Keeping focused on PHP, the assumption that &#8220;OO => slow app&#8221; is particularily acute, which I was attempting to question. Or perhaps what I was challenging was the reverse: procedural &#8220;PHP => fast app&#8221;.</p>
<p>Talking purely in terms of end results, the untestable experiment I&#8217;m trying to suggest is if we gave two, equally talented, developers a problem to solve of significant complexity <i>using PHP</i>, the developer that applies OO is more likely to deliver something that performs well and scales consistently. And that&#8217;s <i>not</i> a direct result of OO directly but rather &#8220;side effects&#8221; that arise from the human side of development.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: arborint</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1716</link>
		<dc:creator>arborint</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1716</guid>
		<description>&lt;p&gt;&lt;blockquote&gt;&lt;p&gt;I'm trying to suggest is if we gave two, equally talented, developers a problem to solve of significant complexity using PHP, the developer that applies OO is more likely to deliver something that performs well and scales consistently&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;
First, I seriously doubt that there would be much difference the performance or scalability either direction, given two equally talented developers. &lt;/p&gt;

&lt;p&gt;However there is one thing about those two apps that the pro-OOP crowd never like to admit. That is that if you gave the code to a sampling of PHP programmers, the vast majority would go for the procedural code because it is simply easier for  most PHP programmers to understand. And that's why there are so many successful PHP apps with procedural code. &lt;/p&gt;

&lt;p&gt;I think the one problem with OOP that never gets mentioned is that it is a methodology driven by consultants who make their living on "the new." You only need to read the SitePoint forums to follow the fads: Use inheritance, no it's bad now. Use get/set, no don't use them any more. Nouns or verbs, who knows which is best yet? Not clear on MVC, that's OK because it is so vague that it can be neither accepted or refuted, only discussed endlessly. &lt;/p&gt;

&lt;p&gt;The main problem that those few who chose the OOP version of your “untestable experiment“ app above is that they would criticize it for only using DataObjects instead of Domain Model - So 2004!&lt;/p&gt;

&lt;p&gt;Seriously, I think your make a good point that performance isn't everything. Applications need to run, but they also have to be built, maintained, changed and extended. That is why good design, regardless the methodologies, is so important. However, I just have not heard much of the positions that you are "challenging". In fact, I think most non-beginner PHP programmers seem to understand that it is things like algorithm choice, database design, and optimizing SQL that actually make real differences in PHP apps. OO vs Procedural is really only on the radar of a very few OOP pundits. &lt;/p&gt;

&lt;p&gt;And that is why I like the basis of your article and the article on performance.  The idea that PHP apps need to be designed to balance the fact that they must be built, maintained, changed, extended and run is an important one. &lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>
<blockquote>
<p>I&#8217;m trying to suggest is if we gave two, equally talented, developers a problem to solve of significant complexity using PHP, the developer that applies OO is more likely to deliver something that performs well and scales consistently</p>
</blockquote>
</p><p>
First, I seriously doubt that there would be much difference the performance or scalability either direction, given two equally talented developers. </p>
<p>However there is one thing about those two apps that the pro-OOP crowd never like to admit. That is that if you gave the code to a sampling of PHP programmers, the vast majority would go for the procedural code because it is simply easier for  most PHP programmers to understand. And that&#8217;s why there are so many successful PHP apps with procedural code. </p>
<p>I think the one problem with OOP that never gets mentioned is that it is a methodology driven by consultants who make their living on &#8220;the new.&#8221; You only need to read the SitePoint forums to follow the fads: Use inheritance, no it&#8217;s bad now. Use get/set, no don&#8217;t use them any more. Nouns or verbs, who knows which is best yet? Not clear on MVC, that&#8217;s OK because it is so vague that it can be neither accepted or refuted, only discussed endlessly. </p>
<p>The main problem that those few who chose the OOP version of your “untestable experiment“ app above is that they would criticize it for only using DataObjects instead of Domain Model - So 2004!</p>
<p>Seriously, I think your make a good point that performance isn&#8217;t everything. Applications need to run, but they also have to be built, maintained, changed and extended. That is why good design, regardless the methodologies, is so important. However, I just have not heard much of the positions that you are &#8220;challenging&#8221;. In fact, I think most non-beginner PHP programmers seem to understand that it is things like algorithm choice, database design, and optimizing SQL that actually make real differences in PHP apps. OO vs Procedural is really only on the radar of a very few OOP pundits. </p>
<p>And that is why I like the basis of your article and the article on performance.  The idea that PHP apps need to be designed to balance the fact that they must be built, maintained, changed, extended and run is an important one. </p>]]></content:encoded>
	</item>
	<item>
		<title>By: BDKR</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1717</link>
		<dc:creator>BDKR</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1717</guid>
		<description>&lt;p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;
In fact, I think most non-beginner PHP programmers seem to understand that it is things like algorithm choice...&lt;br /&gt;
&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;I agree and really think this is more the heart of the issue. Your two talented developers may in fact end up using a very similar algorithm.&lt;/p&gt;

&lt;p&gt;So what is it about OO that &lt;i&gt;may&lt;/i&gt; cause one to come up with a better algorithm (single-pass as opposed to multi-pass in this case)? &lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>
<blockquote>
<p>
In fact, I think most non-beginner PHP programmers seem to understand that it is things like algorithm choice&#8230;
</p>
</blockquote>
</p><p>I agree and really think this is more the heart of the issue. Your two talented developers may in fact end up using a very similar algorithm.</p>
<p>So what is it about OO that <i>may</i> cause one to come up with a better algorithm (single-pass as opposed to multi-pass in this case)? </p>]]></content:encoded>
	</item>
	<item>
		<title>By: arborint</title>
		<link>http://www.sitepoint.com/blogs/2005/01/11/oop-and-performance/#comment-1718</link>
		<dc:creator>arborint</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">986034582#comment-1718</guid>
		<description>&lt;p&gt;Well, you would have to prove it was true before you could find a cause. &lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Well, you would have to prove it was true before you could find a cause. </p>]]></content:encoded>
	</item>
</channel>
</rss>
