Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict; use warnings; # 75O0K8S - Benchmark all the Trigram-finder
    +s!
    use Benchmark   qw(cmpthese                  ); # with liberty taken t
    +o
    ...
      push @tris, $1 while(s/^(.(..))/$2/);                    return @tri
    +s; }
    sub do_regexP   { $_ = $str; s/((?:.)((?:.)(.)))(?=(.)(.))/$1$2$4$3$4$
    +5/g;
                                                            return /(...)/
    +g; }
    
  2. or download this
    counmapA:6
    hmapB   :com mpu omp put ter ute
    hngramG :com mpu omp put ter ute
    ...
    mapstrS   56776/s     988%   510%  385%    320%    288%   281%    183%
    +   126%   118%    116%     116%   87%      58%     57%      48%      
    +--     -76%   -93%
    counmapA 231848/s    4343%  2391% 1880%   1614%   1485%  1455%   1054%
    +   823%   790%    781%     781%  664%     546%    540%     505%    30
    +8%       --   -73%
    regexS   847418/s   16139%  9004% 7136%   6166%   5693%  5583%   4117%
    +  3273%  3151%   3122%    3122% 2693%    2262%   2241%    2111%   139
    +3%     266%     --