Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Looks like the author added the `LICENSE` file in repo root after this comment: https://github.com/scandum/blitsort/blob/main/LICENSE
This is always a great point to bring up, though. People who don't properly declare the license of their OSS projects are (either unintentionally or internionally) make it a headache for companies to use. I'm not saying it's bad to explicitly deny corporate use (via GPL, etc.). The real problem IMO is when other OSS projects vendor unlicensed code and then declare their projects to be under MIT license. Then if a corporation uses it, they're unknowingly violating the copyright of the transitive dep.
> Radix sort is theoretically O(N),
Nothing theoretical about it: Sorting a list of all IP addresses can absolutely and trivially be done in O(N)
> in reality you can't do better than O(log N)
You can't traverse the list once in any sort must be ≥N.
> but memory access is logarithmic
No it's not, but it's also irrelevant: A radix sort doesn't need any reads if the values are unique and dense (such as the case IP addresses, permutation arrays, and so on).
> Edit: I misremembered, memory access is actually O(sqrt(N)): https://github.com/emilk/ram_bench
It's not that either.
The author ran out of memory; They ran a program that needs 10GB of ram on a machine with only 8GB of ram in it. If you give that program enough memory (I have around 105gb free) it produces a silly graph that looks nothing like O(√N): https://imgur.com/QjegDVI
The latency of accessing memory is not a function of N.
Blitsort is a hybrid quicksort, see title.
It is slower than it's unstable brother, aptly named crumsort. https://github.com/scandum/crumsort
Related posts
- Llamafile 0.7 Brings AVX-512 Support: 10x Faster Prompt Eval Times for AMD Zen 4
- Permuting Bits with GF2P8AFFINEQB
- AMD EPYC 97x4 “Bergamo” CPUs: 128 Zen 4c CPU Cores for Servers, Shipping Now
- 10~17x faster than what? A performance analysis of Intel' x86-SIMD-sort(AVX-512)
- The Most Useful Numbers You've Never Heard Of (Veritasium video on p-adic numbers)