Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by ikegami (Patriarch)
on Apr 14, 2005 at 04:58 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://447649]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-24 14:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found