My contribution: Power Sort.
Start with p=0 and add 2^n for each n. Then subtract the largest power of 2 successively to get your integers ordered.
Con: p will be very big.
Pro: you don't need ifs!
Start with p=0 and add 2^n for each n. Then subtract the largest power of 2 successively to get your integers ordered.
Con: p will be very big.
Pro: you don't need ifs!
Another con: you'd better hope your input contains no duplicates. :)
For an efficient implementation, one might want to round L+1 up to the nearest power of 2 to get crucial micro-optimisations based on instructions for bit scanning.
(I think this ends up being a very complicated phrasing of a counting sort.)
I have thought this through (I'm ashamed to admit).