Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: finding number of contiguous letters

by PipTigger (Hermit)
on May 24, 2007 at 10:20 UTC ( #617200=note: print w/replies, xml ) Need Help??

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%     --
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://617200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2020-10-27 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (258 votes). Check out past polls.

    Notices?