Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Faster way to do this?

by mr_mischief (Monsignor)
on Nov 12, 2015 at 21:20 UTC ( [id://1147607]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl foo
                           Rate end_of_substring end_slurped tr_and_end  a
    +ll tr_and_match while split tr_and_split_redux tr_and_split   tr tr_m
    +oar_magic
    ...
    tr                 156250/s             170%       159%        153% 13
    +9%         131%   72%   34%                 2%   --           0%     
    +      -6%
    tr_and_split       156250/s             170%       159%        153% 13
    +9%         131%   72%   34%                 2%   0%           --     
    +      -6%
    tr_moar_magic      166667/s             188%       177%        170% 15
    +5%         147%   83%   43%                 8%   7%           7%     
    +       --
    
  2. or download this
    #!/opt/local/bin/perl
    
    ...
    MIM
    IMI
    M
    
  3. or download this
    $ perl foo
                           Rate end_of_substring tr_and_end end_slurped  a
    +ll tr_and_match while split tr_and_split_redux tr_and_split tr_moar_m
    +agic   tr
    ...
    tr_and_split       128205/s             873%       758%        736% 69
    +9%         555%  365%  177%                 8%           --          
    + -1% -10%
    tr_moar_magic      129870/s             886%       769%        747% 70
    +9%         564%  371%  181%                 9%           1%          
    +  --  -9%
    tr                 142857/s             984%       856%        831% 79
    +0%         630%  419%  209%                20%          11%          
    + 10%   --
    
  4. or download this
    __DATA__
    IIIIIIIIIIIMMMMMMMMMMMMOOOOOOOOOOOOMMMMMMMMMIIIIIIIIIMM
    ...
    MIM
    IMI
    M
    
  5. or download this
    $ perl foo
                          Rate end_of_substring tr_and_end end_slurped   a
    +ll tr_and_match while split tr_and_split_redux tr_and_split tr_moar_m
    +agic   tr
    ...
    tr_and_split       59172/s            2147%      1753%       1734% 163
    +1%        1268%  853%  418%                 9%           --          
    + -5% -40%
    tr_moar_magic      62112/s            2258%      1845%       1825% 171
    +7%        1336%  901%  444%                15%           5%          
    +  -- -37%
    tr                 99010/s            3659%      3000%       2968% 279
    +6%        2189% 1495%  767%                83%          67%          
    + 59%   --
    
  6. or download this
    $ perl5.22 foo
                           Rate end_of_substring   all tr_and_end end_slur
    +ped while tr_and_match split tr_and_split_redux tr_and_split tr_moar_
    +magic   tr
    ...
    tr_and_split        65789/s            1972% 1618%      1331%       12
    +91% 1117%         942%  465%                10%           --         
    +  -2% -41%
    tr_moar_magic       67114/s            2013% 1653%      1360%       13
    +19% 1142%         963%  477%                12%           2%         
    +   -- -40%
    tr                 112360/s            3438% 2835%      2344%       22
    +75% 1979%        1680%  865%                88%          71%         
    +  67%   --
    
  7. or download this
    $ perl5.14.4 foo
                           Rate end_of_substring end_slurped tr_and_end   
    +all tr_and_match while split tr_and_split_redux tr_and_split tr_moar_
    +magic   tr
    ...
    tr_and_split        60606/s            2168%       1738%      1730% 16
    +79%        1317%  841%  395%                16%           --         
    +  -1% -40%
    tr_moar_magic       61350/s            2196%       1760%      1752% 17
    +01%        1334%  852%  401%                17%           1%         
    +   -- -39%
    tr                 101010/s            3680%       2963%      2949% 28
    +66%        2262% 1468%  724%                93%          67%         
    +  65%   --
    
  8. or download this
    $ perl5.18.4 foo
                           Rate end_of_substring tr_and_end end_slurped   
    +all tr_and_match while split tr_and_split_redux tr_moar_magic tr_and_
    +split   tr
    ...
    tr_moar_magic       58480/s            2106%      1818%       1768% 17
    +46%        1340% 1015%  399%                15%            --        
    +  -1% -46%
    tr_and_split        58824/s            2119%      1829%       1779% 17
    +57%        1349% 1022%  402%                15%            1%        
    +   -- -45%
    tr                 107527/s            3956%      3427%       3334% 32
    +95%        2548% 1951%  818%               111%           84%        
    +  83%   --
    
  9. or download this
    $ perl5.20 foo
                           Rate end_of_substring   all tr_and_end end_slur
    +ped tr_and_match while split tr_and_split_redux tr_and_split tr_moar_
    +magic   tr
    ...
    tr_and_split        62500/s            2171% 1879%      1563%       15
    +33%        1222% 1051%  420%                13%           --         
    +  -4% -44%
    tr_moar_magic       65359/s            2275% 1969%      1639%       16
    +07%        1282% 1103%  444%                18%           5%         
    +   -- -42%
    tr                 112360/s            3983% 3457%      2889%       28
    +35%        2276% 1969%  835%               103%          80%         
    +  72%   --
    
  10. or download this
    $ perl5.8.9 foo
    Use of implicit split to @_ is deprecated at foo line 65.
    ...
    tr_and_split_redux 13831/s             254%  195%       188%        17
    +9%   88%   52%                 --          -3%          -76%
    tr_and_split       14245/s             264%  204%       197%        18
    +7%   94%   57%                 3%           --          -75%
    tr_moar_magic      57803/s            1378% 1134%      1105%       106
    +5%  687%  535%               318%         306%            --
    
  11. or download this
    $ perl5.10.1 foo
    Use of implicit split to @_ is deprecated at foo line 65.
    ...
    tr_and_split       12788/s             341%       252%        248%  23
    +8%  104%   63%           --                -0%          -79%
    tr_and_split_redux 12837/s             343%       253%        249%  24
    +0%  105%   64%           0%                 --          -79%
    tr_moar_magic      60606/s            1990%      1568%       1547% 150
    +4%  868%  673%         374%               372%            --
    
  12. or download this
    $ perl5.12.5 foo
                          Rate end_of_substring end_slurped tr_and_end   a
    +ll while split tr_and_split_redux tr_and_split tr_moar_magic
    ...
    tr_and_split_redux 52910/s            1938%       1561%      1546% 151
    +8%  690%  363%                 --         -12%          -15%
    tr_and_split       60241/s            2220%       1792%      1774% 174
    +2%  800%  427%                14%           --           -3%
    tr_moar_magic      62112/s            2293%       1850%      1832% 179
    +9%  828%  443%                17%           3%            --
    
  13. or download this
    $ tail -8 bar
    __DATA__
    ...
    rfeeorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
    +rrrrrrrrrrrrrrrrrooorr
    rferrrrrrrrrrrrroooooooooooooooooooooooooooooooooooooooooooooooooooooo
    +rrrrr
    
  14. or download this
    $ perl5.22.0 bar
                           Rate while all split end_of_substring tr_and_ma
    +tch tr_and_end end_slurped tr_and_split_redux tr_moar_magic tr_and_sp
    +lit   tr
    ...
    tr_moar_magic      147059/s   32% 26%   26%              25%          
    +22%        15%          9%                 1%            --          
    +-1%  -1%
    tr_and_split       149254/s   34% 28%   28%              27%          
    +24%        16%         10%                 3%            1%          
    + --  -0%
    tr                 149254/s   34% 28%   28%              27%          
    +24%        16%         10%                 3%            1%          
    + 0%   --
    
  15. or download this
    $ perl5.22.0 baz
                           Rate end_of_substring tr_and_end end_slurped  a
    +ll while split tr_and_match tr_and_split_redux tr_and_split tr_moar_m
    +agic   tr
    ...
    tr_and_split       133333/s             600%       580%        571% 10
    +4%   79%   75%          72%                12%           --          
    + -4%  -9%
    tr_moar_magic      138889/s             629%       608%        599% 11
    +2%   86%   82%          79%                17%           4%          
    +  --  -6%
    tr                 147059/s             672%       650%        640% 12
    +5%   97%   93%          90%                24%          10%          
    +  6%   --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found