|
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]
|