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

Re: Re: Re: Idiomatic optimizations

by thelenm (Vicar)
on Apr 30, 2002 at 16:59 UTC ( #163127=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use Benchmark qw(cmpthese);
    ...
      'i'       => sub { $text =~ /abc/ig },
      'chars'   => sub { $text =~ /[Aa][Bb][Cc]/g },
    });
    
  2. or download this
    Benchmark: timing 10 iterations of chars, i...
         chars: 40 wallclock secs (38.37 usr +  0.04 sys = 38.41 CPU) @  0
    +.26/s (n=10)
    ...
          s/iter chars     i
    chars   3.84    --  -70%
    i       1.14  236%    --
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-09-22 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls