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

Re^3: Benchmark, -s versus schwartzian (vs hash)

by ambrus (Abbot)
on Aug 23, 2004 at 08:15 UTC ( [id://385023]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub sort_new {
            my %h;
    ...
            %h = map {$_, -s $_} @all;
            @results = sort { $h{$a}<=>$h{$b} } @all;
    }
    
  2. or download this
    /bin/ contains 172 files
    Benchmark: timing 250 iterations of Ordinary, Schwartzian, Strange, St
    +range2, Strange3, Strange4...
    ...
      Strange2: 66 wallclock secs (57.68 usr +  7.76 sys = 65.44 CPU) @  3
    +.82/s (n=250)
      Strange3: 60 wallclock secs (53.29 usr +  7.03 sys = 60.32 CPU) @  4
    +.14/s (n=250)
      Strange4: 71 wallclock secs (62.48 usr +  7.83 sys = 70.31 CPU) @  3
    +.56/s (n=250)
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found