in reply to Re: Re: undef speedup ?!
in thread undef speedup ?!

I tend to not use the sub variant, but the string variant. Using a sub means entering and leaving a scope, and that takes time. If that time is significant compared to what you are benchmarking, your results are far less useful than they could be. Watch:
#!/usr/bin/perl use strict; use warnings; use Benchmark qw /cmpthese/; our ($x, $y); cmpthese -1 => { sub => sub {$::x ++}, string => '$::y ++', } __END__ Rate sub string sub 9175039/s -- -29% string 12862205/s 40% --

Abigail