in reply to Question with Benchmark.pm
Why not just write to a dummy file. I kind of like this a hair better than writting to dev null or monkeying around with stdout. This would be a very fast change.
open my $fh, '>','delete.this.later' or die ("Unable to open temp file + : $!"); ... my $result = timethese ( -5, { test => sub { print $fh @A }, ...
And then just delete the file afterword. Sure you'll introduce a bit of Disk IO, but it's the same DiskIO for all of your test threads, so it should wash out in terms of a comparison.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Question with Benchmark.pm
by chromatic (Archbishop) on Dec 13, 2007 at 19:13 UTC |