Introducing: Marriage Sort
thelowlyprogrammer.com
thelowlyprogrammer.com
(I'd hate to see somebody skip the sort application thinking it's dupe.)
A factor of equality exponentially complicates this hypothesis.
;)
Upon first glance it seems that it might perform really well with N = cache_line_size / sizeof(T) so perhaps N = 16 for sorting ints?
What size array would be optimal for N = 16?
You might be thinking of when √n - 1 = 16, (i.e. the maximum size of the initial length the pivot is picked from is 16). In that case, n = 17*17, or 289.
Does that help?