Re:Vectorized and performance-portable Quicksort
by superjan on Saturday June 04, 2022 @03:13PM
(#31624075)
Great work! Does it also support sorting object pointers by a numeric key?
[ Parent
| on HN ]
Re:Vectorized and performance-portable Quicksort
by janwas on Sunday June 05, 2022 @01:39AM
(#31628347)
Thanks :) If I understand correctly, you have tuples of (number, T*) and want to sort by number? That can be done by storing these tuples interleaved, reinterpret_casting to hwy::uint128_t (making sure that the pointer bits are in the least-significant half), and sorting those.