|
Posted by Sanders Kaufman on 07/25/07 18:45
Rik wrote:
> On Wed, 25 Jul 2007 18:56:08 +0200, Sanders Kaufman <bucky@kaufman.net>
>>>> What you guys are doing here is - you're asking me to make the
>>>> application LESS efficient in order to conform to your herd mentality.
>>> It is as efficient as yours, but more stable.
>>
>> So - making two function calls in PHP uses no more resources than
>> making one? I don't buy it.
>
> It is negligable.
Negligible - I love that word. Sure, the inefficiency is there, and
sure, it's small.
Maybe that should be my marketing slogan - "It's only a *little*
inefficient".
> And it assures compatibility, as stated before: the
> fact you can call the constructor like a normal method in the present
> situation is not something to be relied upon.
Compatible is a transitive verb - it needs an object (e.g. - compatible
with...).
Furthemore - there is absolutely NO chance that the PHP folks will
change PHP4 in a way that would break this, so it is completely reliable.
Beyond that, since PHP5 aims to be backwardly compatible, there is very
little chance that it will have a problem with this design pattern, either.
> Result:
> A:0.001378059387207
> B:0.0017580986022949
>
> And that is on my homebox, entirely not optimised for this kind of
> thing. 500 instantiations. I really don't care about the difference here..
That was very cool, and I WELL appreciate seeing the performance hit in
REAL numbers.
Unfortunately, it reaffirms my position that, while the performance hit
is near nil - it's still there.
It's like recycling plastic and glass. I know darned good and well that
throwing my little pop can into the recycle bin helps the environment
very little - but I do it anyway. It's the principle of the thing.
It pops a vision into my head: I'm pitching my app to a web farm, and
standing next to me is a guy who's also pitching his own - each with the
exact same functionality - but mine takes only ONE less CPU cycle.
Then I get the million dollar contract, speaking engagements, the key to
the city, and a pin from the pope - and he gets his parking validated.
It could happen!
Navigation:
[Reply to this message]
|