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

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

by ikegami (Pope)
on Feb 06, 2019 at 03:31 UTC ( #1229451=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
                    @list = unpack 'j*', pack 'J*',
                            sort { $a <=> $b }
                            unpack 'J*', pack 'j*',
                            @list;
    
  2. or download this
                    @list = unpack 'j>*',
                            sort
                            pack 'j>*',
                            @list;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2021-10-21 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (82 votes). Check out past polls.

    Notices?