Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Fundamental Benchmarks

by Lexicon (Chaplain)
on Apr 02, 2001 at 12:23 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-24 04:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found