http://www.perlmonks.org?node_id=1210508


in reply to Re: Unexplained benchmark when using chop vs. chomp (or neither)
in thread Unexplained benchmark when using chop vs. chomp (or neither)

four very different algorithms
Well, benchmarking several times the same code and using the result to simulate a horse race is a legitimate use of Benchmark. But some people also use Benchmark to compare different algorithms that give the same result.

Also, you neglect to place the three “Perl alternatives”
As a matter of fact, since the issue is that the input data is modified by the chopping function, comparing them in the same run may have shown that all the variants gets faster when chop is called.

  • Comment on Re^2: Unexplained benchmark when using chop vs. chomp (or neither)