Help for this page

Select Code to Download


  1. or download this
    2;130 juerd@ouranos:~/modje/Blah/Acme/Tie/Handle/Blah/Acme-Tie-Handle-
    +Blah--0.10$ perl -MBenchmark=cmpthese -e'$_="fooooo"; cmpthese(-1, {r
    +e => sub {$a = !/^\.\.?\z/}, ne => sub { $a = ($_ ne "." and $_ ne ".
    +."); }})'
    Benchmark: running ne, re, each for at least 1 CPU seconds...
    ...
            Rate   ne   re
    ne 1218809/s   -- -32%
    re 1803743/s  48%   --
    
  2. or download this
    2;0 juerd@ouranos:~/modje/Blah/Acme/Tie/Handle/Blah/Acme-Tie-Handle-Bl
    +ah--0.10$ perl -MBenchmark=cmpthese -e'$_="foo"; cmpthese(-0.3, { z =
    +> sub { /o\z/ }, Z => sub { /o\Z/ } });'
    Benchmark: running Z, z, each for at least 0.3 CPU seconds...
    ...
           Rate    Z    z
    Z 3670016/s   -- -17%
    z 4419870/s  20%   --