[PHP-DEV] while cs. for From: David Sklar (sklar <email protected>)
Date: 08/20/99

In some benchmarking I'm doing, while() loops are a little faster than
equivalent for loops. Is this just a side-effect of how the parser rules are
written?

e.g, the two loops I'm comparing are:

  $j = 0;
  while ($j < $iter) {
    $a = 1;
    $j++;
  }

and

  for ($j = 0; $j < $iter; $j++) {
    $a = 1;
  }

-dave

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>