Get the latest tech news
Kth: High-Performance Selection Algorithms for Go
Fast selection algorithms for Go. Contribute to tsenart/kth development by creating an account on GitHub.
kth provides high-performance selection algorithms that find the k-th smallest element without sorting the entire dataset. It's especially useful for operations like finding top-N elements or medians in large datasets. Speed: Both significantly outperform sort-based selection, with up to 99% improvement in common cases Memory Efficient: All operations are in-place, requiring no additional memory Production Ready: Battle-tested and fuzzed implementations that work with any ordered type
Or read this on Hacker News