Hacker News new | ask | show | jobs
by superjan 1481 days ago
Great work! Does it also support sorting object pointers by a numeric key?
1 comments

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.