subspace
subspace copied to clipboard
Make sort robust to invalid Ord impl
https://research.swtch.com/ub Points out std::sort can OOB if the Ord impl is invalid. We don’t want that!! So get off std::sort and std::unstable_sort
https://github.com/Voultapher/sort-research-rs/blob/main/writeup/sort_safety/text.md#safety-vs-performance-a-case-study-of-c-c-and-rust-sort-implementations
From this we can see for safety and performance we can just port the rust sort algorithms over directly.