Next | Making Programs Faster | 31 |
I don't use Benchmark.pm any more
That's for several reasons
Here's the results of five consecutive runs of the same benchmark
regex: ( 7.79 usr + 0.01 sys = 7.80 CPU) substr: ( 7.34 usr + 0.02 sys = 7.36 CPU)
regex: ( 8.02 usr + 0.00 sys = 8.02 CPU) substr: ( 7.04 usr + 0.00 sys = 7.04 CPU)
regex: ( 7.95 usr + 0.01 sys = 7.96 CPU) substr: ( 7.63 usr + 0.00 sys = 7.63 CPU)
regex: ( 8.28 usr + 0.01 sys = 8.29 CPU) substr: ( 7.40 usr + -0.01 sys = 7.39 CPU)
regex: ( 8.04 usr + -0.03 sys = 8.01 CPU) substr: ( 6.92 usr + 0.00 sys = 6.92 CPU)
Problem #1: The individual measurements vary by up to 7%
Problem #2: Some of the tests are running backwards in time
I've also seen:
null: -1 wallclock secs (-0.07 usr + 0.01 sys = -0.06 CPU) @ -16666666.67/s (n=1000000)
Next | Copyright © 2003 M. J. Dominus |