> There's lots more optimizations possible with this technique, e.g. counting-sort style bucketing.
:) I was going to say that since you are half re-inventing bucket-sort anyway, why not go the whole hog.
Is the code three-part quicksort simpler and easier to understand than a bucket sort?