Re: Performance: While or For loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, March 24, 2007 4:52 am, Tijnema ! wrote:

>> That means that at 1000 iterations, you are "saving" how much time?
>>
>> .00026 seconds?
>> .00004 seconds?
>>
>> Puhleaze.
>
> Well, if you execute this script 1000 times, you would get a
> difference of 2.6 seconds?
> But if every microseconds counts for your script, then you should now
> about this.

No.

Re-read the benchmards.

At 1000 iterations you're looking at .000xx seconds.

At a MILLION iterations, you're looking at 0.xx seconds

At a TEN MILLION iterations, you've broken the 1-second barrier.

How many PHP scripts do a for or while loop 10 million iterations?

xx is either 26 or 4, depending on whose benchmarks you believe.

Running tests with 10 million iterations to benchmark is great for
removing overhead margin of error.  It's also great to look at exactly
how many times you'd have to do something to make a significant
savings.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux