Help for this page
$ perl -MBenchmark=cmpthese -le 'my $a; $_ = "abcdefghi"; cmpthese( 2_ +000_000, { "01 \$&" => sub { /def/; $a = $& } } )' Rate 01 $& ... Rate 02 substr 03 paren 02 substr 116822/s -- -89% 03 paren 1098901/s 841% --