I do remember seeing that a long time ago, I've not encountered it with recent versions?
The thing causing this behaviour is still there, running empty loops and subtracting times.
Here's an example:
BTW, it took about 5 _minutes_ to run this benchmark. And for some reason, it decided to run 'trivial2' 16 times as many times as 'trivial1'.#!/usr/bin/perl use strict; use warnings; use Benchmark; timethese -1, { trivial1 => sub {1}, trivial2 => sub {2}, }; __END__ Benchmark: running trivial1, trivial2 for at least 1 CPU seconds... trivial1: 1 wallclock secs ( 1.13 usr + 0.00 sys = 1.13 CPU) @ 44 +79726.55/s (n=5062091) trivial2: 3 wallclock secs ( 1.97 usr + -0.01 sys = 1.96 CPU) @ 43 +171185.71/s (n=84615524)
In reply to Re^4: &1 is no faster than %2 when checking for oddness. (Careful what you benchmark)
by Anonymous Monk
in thread &1 is no faster than %2 when checking for oddness. Oh well.
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |