http://www.perlmonks.org?node_id=1229463


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

You might not have run this with DO_CHECK *on*, as your lists sort like 1 2 3 4 5 0 -5 -4 -3 -2 -1: Your 0 ends up in the middle instead of at the start.


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^4: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
by hdb (Monsignor) on Feb 06, 2019 at 11:13 UTC

    I did, that's why I said it fails if there is a zero in the data. I am still thinking whether it can be saved in some way without extra checks for zero.