From: Slaven Rezic Date: Sun, 19 May 2002 16:03:12 +0000 (+0200) Subject: Benchmark.pm: empty loop too slow X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6bf773bc686b4cd0d5636f17f9d73af75a9598a9;p=p5sagit%2Fp5-mst-13.2.git Benchmark.pm: empty loop too slow Message-Id: <200205191403.g4JE3ClB025990@vran.herceg.de> p4raw-id: //depot/perl@16693 --- diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index 175c9c6..cda764f 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -549,7 +549,7 @@ sub timeit { if ($cache && exists $cache{$cache_key} ) { $wn = $cache{$cache_key}; } else { - $wn = &runloop($n, ref( $code ) ? sub { undef } : '' ); + $wn = &runloop($n, ref( $code ) ? sub { } : '' ); # Can't let our baseline have any iterations, or they get subtracted # out of the result. $wn->[5] = 0;