Patent classifications
G06F7/26
In-place sorting
Implementations described herein relate to improved in-place sample sorting of data. In various implementations, unsorted elements of a set stored in a first memory segment may be compared to splitter values to determine respective counts of elements of the set that will fit into each of a plurality of buckets bounded by the splitter values. Some number of elements from each of multiple ranges of the first memory segment that correspond to the multiple buckets may be moved to a smaller second memory segment. Remaining elements may be redistributed from at least some of the plurality of ranges of the first memory segment across the plurality of ranges based on comparing the remaining elements to the splitter values. The elements from the second memory segment may then be distributed across the plurality of ranges based on comparing the elements to the splitter values.