AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
The Conflict Between Generic Types and Performance Optimization in Go
Slices dot sort works for things like ints and strings that you can compare with less than. And then there's a variant which is called slices dot sort funk, where you supply a less function. I mean, it's not as much faster. But as you just said, it's calling through reference to a function, which is much faster than doing dynamic dispatch on the on the elements of the slice.