Re: Calendar Problem
| From: | tedd | Date: | Wed, 12 Aug 2009 15:07:25 +0000 |
| Subject: | Re: Calendar Problem | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296707@lists.php.net to get a copy of this message | ||
At 9:50 AM -0500 8/12/09, Shawn McKenzie wrote:
tedd wrote:But of course -- no one try is definitive, you need many. For example, I wrote a script to show that PHP's rounding function had an upward bias, which it does, but it took thousands of iterations to see it. Not worth the effort to correct. In any event, it's interesting to see how we all approached the problem from different directions. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comYour solution had 61 iterations (for loop) while mind had only 21, so mine's a bit faster. Here's the comparison: http://php1.net/b/fridays/ But I'll use your solution -- it's more elegant. Thanks for the code, teddActually, if you refresh your page you have different winners. When I first visited the page yours was fastest by approximately .001, but on refresh yours is slower by .001. You need to execute the test let's say 100 or 1000 times or more (more is better) and take either the average or I would say the minimum. -- Thanks!