Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^6: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

by Tux (Canon)
on Sep 15, 2020 at 14:18 UTC ( [id://11121794]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MBenchmark=cmpthese -wE'my$x=join"    "=>"",("aaa")x5,"";say"s
    +ourc: |$x|";sub splt{split" ",$x,1};sub rgx{$x=~s/^\s+//r};say "split
    +: |",splt(),"|";say"regex: |",rgx(),"|";cmpthese(-2,{splt=>\&splt,rgx
    +=>\&rgx})'
    sourc: |    aaa    aaa    aaa    aaa    aaa    |
    ...
              Rate  rgx splt
    rgx  3382502/s   -- -58%
    splt 7989872/s 136%   --
    
  2. or download this
    $ perl -MBenchmark=cmpthese -wE'my$x=join"    "=>"",("abc")x5,"";say"s
    +ourc: |$x|";sub splt{split" ",reverse((split" ",(reverse$x),1)[0]),1;
    +};sub rgx{$x=~s/^\s+//r=~s/\s+$//r};say "split: |",splt(),"|";say"reg
    +ex: |",rgx(),"|";cmpthese(-2,{splt=>\&splt,rgx=>\&rgx})'
    sourc: |    abc    abc    abc    abc    abc    |
    ...
              Rate  rgx splt
    rgx  1047602/s   -- -64%
    splt 2915089/s 178%   --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-25 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found