Help for this page
Benchmark: running regexp, transl, each for at least 10 CPU seconds...
regexp: 10 wallclock secs (10.59 usr + 0.00 sys = 10.59 CPU) @ 37
Rate regexp transl
regexp 37275/s -- -88%
transl 313981/s 742% --
use Benchmark qw(cmpthese);
'transl' => '$x =~ tr/-/_/; $x =~ tr/_/-/;',
'regexp' => '$x =~ s/-/_/g; $x =~ s/_/-/g;',
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (313 votes). Check out past polls.