Chris Shiflett <mailto:[EMAIL PROTECTED]>
    on Tuesday, September 30, 2003 11:39 AM said:

> The comma isn't concatenation; echo can take multiple arguments.

Oh ok, I get it.

> I've heard statements about passing multiple arguments to echo being
> faster than using concatenation, but every benchmark I've tried
> myself shows them to be nearly identical. Feel free to try it
> yourself and post your results. :-) I'd be curious to see if others
> reach the same conclusion. 

I tried this, and I think the comma was just slightly faster than the
period. But then again I didn't always get consistent results because I
was trying this out on a machine that is not very fast so the speed at
which is processes something varies quite a bit.

My conclusion was that it's not fast enough to bother changing all my
code, or start writing in a new way.


Although during some testing I did find that writing loops in the
following way is faster than normal.

$counter = -1;
while(++$counter < $amount)
{
        // do stuff
}

It made a big enough difference on my slow machine to merit me writing
as many loops in this way as I can. (I think.)



Chris.

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

Reply via email to