Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://163127]
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 2015-11-28 00:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (735 votes), past polls