Post #3721903
2026-07-10 17:29 UTC
Replies (3)
-
@joe@f.duriansoftware.com 2026-07-10 17:54
@slava@mathstodon.xyz @zwarich@hachyderm.io it might depend on what you want generic sorting for. if you just need some arbitrary ordering for your generic ordered binary tree, then bulk bitwise might be fine
-
@zwarich@hachyderm.io 2026-07-10 17:34
@slava@mathstodon.xyz @joe@f.duriansoftware.com I think we just rediscovered why people liked big endian to begin with, but I imagine you have all sorts of cursed non-lexicographic monoid orderings in your pocket.
-
@zwarich@hachyderm.io 2026-07-10 17:45
@slava@mathstodon.xyz @joe@f.duriansoftware.com There is a parallel opinionated approach to sorting. You get rid of comparison-based sorting and give every type a discriminator to implement generic radix sort: https://www.cambridge.org/core/journals/journal-of-functional-programming/article/generic-topdown-discrimination-for-sorting-and-partitioning-in-linear-time/B85E48EFC0B4D2BDDDE9A3885094FDD7