Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: better (faster) way of writing regexp

by Marshall (Prior)
on Dec 03, 2009 at 07:11 UTC ( #810761=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    substr => sub{
          my $t2 = '20090123';
    ...
          die if (length($t2)!= 8);
          die if ($t2 =~ /\D/);
        },
    
  2. or download this
    #!perl
    use v5.10;
    ...
    isook   324886/s     64%      8%      5%      --     -2%    -60%
    repeat  329924/s     67%      9%      7%      2%      --    -60%
    substr  820345/s    314%    172%    165%    153%    149%      --
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2015-07-02 18:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls