You are here: Re: [PHP] Objects and Performance « PHP « IT news, forums, messages
Re: [PHP] Objects and Performance

Posted by Greg Donald on 06/10/05 00:41

On 6/9/05, Matthew Weier O'Phinney <matthew@garden.org> wrote:
> Actually, that is the point.

If I decide the write a script, and it is my idea, then the point of
the script is my own. It's a simple benchmark. I doubt a client
would ever come to me and say "Can you write me a script to add two
random numbers a thousand time?" No, it's not gonna happen. I
decided what the benckmark would do, and so I wrote it. I wrote two
versions, a full-on OO version, and a pure procedural one. _That_ is
the point of the benchmark. What do you not grasp about that?

> What Chris

Chris who?

> was getting at is that usually you have a bit more going on
> in a function or method -- several operations, not just a wrapper for a
> single operation -- that the function/method call serves to abstract.

If you think it matters a great deal rewrite the benchmark and remove
it. The OO version will still be slower.

Putting a single function call in a wrapper function is better known
as 'abstraction'. If later I decide to use srand() instead of
mt_srand() I only have to change it in one place.

> if you're working
> for a client under a deadline, you don't always have that luxury.

Exactly why I always write procedural style. It's much faster to
code, to run, and to debug.


--
Greg Donald
Zend Certified Engineer
http://destiney.com/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация