This PR exposes two cargo features to enable glidesort as the sort algorithm for the grenad Sorter:
glidesort-stable: Use glidesort to stable sort in the Sorter instead of using the std sort algorithms.
glidesort-unstable: Use glidesort to unstable sort in the Sorter. Note that it will use a stable sort as glidesort doesn't support unstable sorting but is usually faster than the unstable sorting of the std.
Glidesort can also take the external buffer as a parameter which allows us to reduce the number of new allocations and speedup the Sorter again. The Sorter could allocate this buffer when created and keep it until dropped. Still, it could just take a slice of the available memory in the big buffer already allocated to store the keys and EntryBounds. It is a possible future work in this PR.
This PR exposes two cargo features to enable glidesort as the sort algorithm for the grenad Sorter:
glidesort-stable
: Use glidesort to stable sort in the Sorter instead of using the std sort algorithms.glidesort-unstable
: Use glidesort to unstable sort in the Sorter. Note that it will use a stable sort as glidesort doesn't support unstable sorting but is usually faster than the unstable sorting of the std.Glidesort can also take the external buffer as a parameter which allows us to reduce the number of new allocations and speedup the Sorter again. The Sorter could allocate this buffer when created and keep it until dropped. Still, it could just take a slice of the available memory in the big buffer already allocated to store the keys and
EntryBounds
. It is a possible future work in this PR.