Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 wandering the Monastery: (12)
As of 2014-11-26 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (172 votes), past polls