perl -we' ($m, $i) = @ARGV; use Benchmark; timethese($i, { block => sub { $x = 0; while (++$x < $m) { $x++ } }, noblock => sub { $x = 0; ++$x while ++$x < $m } });' 100000 1000 Benchmark: timing 1000 iterations of block, noblock... block: 9 wallclock secs ( 9.10 usr + 0.00 sys = 9.10 CPU) @ 109.89/s (n=1000) noblock: 8 wallclock secs ( 8.07 usr + 0.00 sys = 8.07 CPU) @ 123.92/s (n=1000)