Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Choosing the right sort (Or: WUDsamatter?)

by ikegami (Pope)
on Apr 14, 2005 at 04:58 UTC ( #447649=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @unsorted = sort map { "foo$_.tla" } 0..999;
    
    ...
       schwartzian => sub { my @a = schwartzian @unsorted; },
       guttros     => sub { my @a = guttros     @unsorted; },
    });
    
  2. or download this
                  Rate       naive      orcish schwartzian     guttros
    naive       48.3/s          --        -34%        -46%        -60%
    orcish      73.1/s         51%          --        -19%        -40%
    schwartzian 90.1/s         86%         23%          --        -26%
    guttros      122/s        152%         67%         35%          --
    
  3. or download this
    my @unsorted = sort map { "foo$_.tla" } 0..999;
    
    ...
       schwartzian => sub { scalar schwartzian @unsorted; },
       guttros     => sub { scalar guttros     @unsorted; },
    });
    
  4. or download this
                (warning: too few iterations for a reliable count)
                (warning: too few iterations for a reliable count)
    ...
    guttros        144/s         35%          --       -100%       -100%
    orcish      106383/s      99666%      73834%          --         -0%
    naive       106383/s      99666%      73834%          0%          --
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-04-19 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (358 votes), past polls