Welcome to WebmasterWorld Guest from 18.207.136.184

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Some PHP benchmarking tests

     
2:22 pm on Dec 9, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2003
posts:775
votes: 0


There's some interesting bench marking here
[php.lt...]

One I found most interesting is, "Always calculate the length of the loop in advance!"

Notice that this is a live run so if you refresh the numbers change.

Tim

5:13 pm on Dec 9, 2005 (gmt 0)

Full Member

10+ Year Member

joined:Aug 8, 2003
posts:232
votes: 0


Very interesting. I always wondered if the & (reference) operator sped things up at all. It looks like it doesn't in most cases.
6:47 pm on Dec 9, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8637
votes: 283



if you refresh the numbers change.

I didn't notice that at first and was wondering why

$tmp[] = 'aaaaaaaaaaaaaaaaaaaa';

took 2390% more time than

$tmp[] = "aaaaaaaaaaaaaaaaaaaa";

Refresh and of course that changes - so much so that I'm not sure what to make of these numbers. Quite often the numbers I see belie the conclusions. I usually run a lot of iterations, which has the advantage of averaging, but the disadvantage of throwing caching and other such into the mix in terms of what's really happening.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members