Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Performance penalty of using qr//

by Eily (Monsignor)
on Dec 21, 2017 at 10:32 UTC ( [id://1205969]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub use_str
    {
        my $re = qr/^1\d2\d3\d4\d5\d6\d7\d8\d900$/;
    ...
    
        die;
    }
    
  2. or download this
    Benchmark: timing 5 iterations of use_qr, use_re, use_str...
        use_qr: 33 wallclock secs (33.62 usr +  0.00 sys = 33.62 CPU) @  0
    +.15/s (n=5)
        use_re: 18 wallclock secs (17.14 usr +  0.00 sys = 17.14 CPU) @  0
    +.29/s (n=5)
    ...
    use_re    3.43     96%     46%      --
    
    Appuyez sur une touche pour continuer...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-18 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found