I have a vector of a few hundred million elements that are np.uint8. They only range in value from 0 to 255.
I need to sort this list, and I think it should be more quickly handled than quicksort. I think I could find indices for all value "0" and put them at the front, then for all value "1" and put them after the last insert, and progress until I am done. It would be the mutant offspring of unique and sort with some indexing and should work very quickly.
Is there a built-in that does this well, properly, and in something fast like "C" without me having to homebrew it? Could you point me to it?
Let's say that as a "toy" of my actual problem that I wanted to sort the intensity values for each color (rgb) of a 100 megapixel version of the mandrill image where each color had been converted into a single, very long, vector of uint8 values. If I were to time the difference between sorting methods, which would be reasonable to compute, in python?