News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



WebDevLogs.com:
BREAK the FOR VS WHILE loop war
1 comment :: posted Tuesday March 27, 2007 @ 11:37:00
voice your opinion now!

In this new post on Mgccl's blog today, there's a response to these benchmarks from John Walsh concerning which is faster - a for loop or a while loop.

In this new post, Mgccl, he points out two other examples that show that a while loop is always faster than a for loop. To help prove the point, he's also included a screencast where he shows the code he's using to run the benchmarks (several different tests).

His results, matching the results from the other reports, not only shows that the while loop is faster (still only slightly), but also consumes less memory in the process.

tagged with: forloop whileloop benchmark statistic screencast forloop whileloop benchmark statistic screencast




package mysql release application PHP5 code pecl database framework cakephp book ajax job releases developer PEAR zend security conference zendframework

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework