Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by ambrus (Abbot)
on Aug 23, 2004 at 08:15 UTC ( #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
Node Status?
node history
Node Type: note [id://385023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-08-22 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (156 votes), past polls