fast algorithm implementation to sort very small set
- by aaa
hello.
This is the problem I ran into long time ago.
I thought I may ask your for your ideas.
assume I have very small set of numbers (integers), 4 or 8 elements, that need to be sorted, fast.
what would be the best approach/algorithm? my approach was to use the max/min functions. I guess my question pertains more to implementation, rather than type of algorithm.
At this point it becomes somewhat hardware dependent , so let us assume Intel 64-bit processor with SSE3 .
Thanks