Re: Performance: While or For loop
| From: | Tijnema ! | Date: | Sat, 24 Mar 2007 09:52:35 +0000 |
| Subject: | Re: Performance: While or For loop | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251273@lists.php.net to get a copy of this message | ||
On 3/24/07, Richard Lynch <ceo@l-i-e.com> wrote:
On Fri, March 23, 2007 7:54 pm, Tijnema ! wrote: On 3/24/07, Richard Lynch <ceo@l-i-e.com> wrote: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. TijnemaIt was more likely to get an idea if there was a real difference or not, and apparently there is not really a big difference. But well if you are going to create a script where 1000+ loops are, you might get a few seconds faster script :) I believe we are seeing times for 10000000 iterations around 4 seconds? Or was it 26 seconds? Whatever. That means that at 1000 iterations, you are "saving" how much time? .00026 seconds? .00004 seconds? Puhleaze.Folks: How often do you use a loop of any kind in PHP with enough iterations that this is even significant? Write the code that makes sense. Optimize the biggest bottleneck until performance is acceptable.
-- 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?