Welcome to WebmasterWorld Guest from 18.104.22.168
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.
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.