Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

by Tux (Canon)
on Feb 05, 2019 at 14:31 UTC ( #1229409=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    cmpthese (-2, {
        sortfirst => sub {
    ...
            DO_CHECK and (Compare (\@list, [0..5, -5..-1]) or die "@list")
    +;
            },
        });
    
  2. or download this
                  Rate     pryrt packunpck   choroba grepfirst sortfirst
    pryrt     123672/s        --      -35%      -39%      -66%      -73%
    ...
    choroba   204244/s       65%        7%        --      -44%      -56%
    grepfirst 367991/s      198%       94%       80%        --      -20%
    sortfirst 460545/s      272%      142%      125%       25%        --
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2021-11-28 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?