racket/collects/tests/mzscheme/benchmarks/rx/perl_prefix.pl
Matthew Flatt 7e6ab6ee47 finish up rx benchmark
svn: r4337
2006-09-14 08:08:56 +00:00

14 lines
221 B
Perl

use Time::HiRes qw(time);
sub test ($$$) {
local ($x, $pattern, $times) = @_;
$start = time;
for ($i = 0; $i < $times; $i++) {
$x =~ ${pattern};
}
$duration = (time - $start);
print $duration . "\n";
}