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

Fundamental Benchmarks

by Lexicon (Chaplain)
on Apr 02, 2001 at 12:23 UTC ( #68950=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Benchmark;
    
    ...
      '5 Sub (Ref)' => 'for (1..$b) { doSubR(\$_); $trash = $_  };',
      '6 Sub (Val)' => 'for (1..$b) { $trash = doSubV($_)       };',
    });
    
  2. or download this
    [lexicon]$ perl bench.pl 10 1000000
    A = 10  B = 1000000
    ...
    4 Hash     : 184 wallclock secs (156.99 usr +  0.60 sys = 157.59 CPU)
    5 Sub (Ref): 388 wallclock secs (327.87 usr +  1.30 sys = 329.17 CPU)
    6 Sub (Val): 312 wallclock secs (266.54 usr +  1.02 sys = 267.56 CPU)
    
  3. or download this
    Function  Time(S)   Relative
    Mult:     19        01.00
    ...
    Hash:     127       06.68
    Sub (R):  299       15.70
    Sub (V):  237       12.47
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2015-07-31 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls