Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Efficiency of map vs. more verbose basic/fundamental code

by ruzam (Curate)
on Oct 04, 2012 at 22:57 UTC ( [id://997341]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl 
    use strict;
    ...
       'Verbose3' => 'verbose3(\%h)',
       'Idiom' => 'idiom(\%h)',
    });
    
  2. or download this
    Results:
    Benchmark: timing 1000000 iterations of Idiom, Verbose, Verbose2, Verb
    +ose3...
    ...
       Verbose: 12 wallclock secs (12.92 usr +  0.00 sys = 12.92 CPU) @ 77
    +3993.81/s (n=10000000)
      Verbose2: 13 wallclock secs (13.06 usr +  0.00 sys = 13.06 CPU) @ 76
    +5696.78/s (n=10000000)
      Verbose3: 15 wallclock secs (13.90 usr +  0.01 sys = 13.91 CPU) @ 71
    +8907.26/s (n=10000000)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-28 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found