Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^6: Performance penalty of using qr//

by vr (Curate)
on Dec 22, 2017 at 19:26 UTC ( [id://1206065]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    sub foo { map /$str/, 1 .. 3 }
    
    foo for 1 .. 2;
    
  2. or download this
    Compiling REx "foobar"
    Final program:
    ...
    Compiling REx "foobar"
    Compiling REx "foobar"
    Compiling REx "foobar"
    
  3. or download this
    use strict;
    use warnings;
    ...
        }
    );
    cmpthese $r;
    
  4. or download this
                Rate use_str1  use_str   use_qr
    use_str1  3.65/s       --     -99%    -100%
    use_str    436/s   11853%       --     -99%
    use_qr   31592/s  865014%    7138%       --
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-03-28 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found