Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Craftier

by BatGnat (Scribe)
on Dec 15, 2000 at 03:53 UTC ( [id://46757]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Benchmark;
    my $junk = 'The quick brown fox Jumped over the lazy dog';
    timethese(5000000,
    ...
        'regex1'    => '$junk =~ tr/\s//;',
        'regex2'    => '$junk =~ s/\s//g;',
    });
    
  2. or download this
    Benchmark: timing 5000000 iterations of regex1, regex2, split...
        regex1:  3 wallclock secs ( 4.38 usr +  0.00 sys =  4.38 CPU) @ 11
    +42334.93/s (n=5000000)
        regex2:  3 wallclock secs ( 3.50 usr +  0.00 sys =  3.50 CPU) @ 14
    +26940.64/s (n=5000000)
         split: 15 wallclock secs (15.07 usr +  0.00 sys = 15.07 CPU) @ 33
    +1762.99/s (n=5000000)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 20:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found