New

The latest blog posts to take off on Hacker News. 384 posts.

Programming Languages
2022
290

Faster Sorting with Go Generics

Recently, a new set of sorting functions has landed in Go's golang.org/x/exp/slices package [1] . These functions leverage Go generics to provide a more ergonomic API for sorting (without requiring users to implement sort.Interface ), and also deliver a nice performance improvement, as the CL demonstrates.