On Mon, 2005-11-21 at 10:31, Richard Heyes wrote:
> Robert Cummings wrote:
> > On Mon, 2005-11-21 at 10:02, Richard Heyes wrote:
> > 
> >>Readability is in the eye of the beholder.
> > 
> > 
> > But efficiency isn't ;)
> 
> Try measuring the difference between the various methods over a 
> realistic number of iterations, eg. 100. There's little point in going 
> through ones code trying to "optimise" these things. Sure you might gain 
>   a millisecond here or there, but so what? You'd have to have a 
> *seriously* busy site for that to make a difference.

I won't disagree, but I'd say being in the habit of writing semi-optimal
code in the fist place, will save you needing to learn new habits later
when you do work on a *seriously* busy site :) I didn't argue for ''
versus "", but sprintf() is a cycle pig in comparison to either. not
only that, but since it's not a keyword, it incurs stack overhead.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to