Faster sorting with Go generics
In this post, I'll dive deep into why these generic functions are faster than the existing ones in the
sort
package, even though they use precisely the same algorithm and loop structure. This should hopefully be an interesting peek into how Go generics are implemented, in comparison to the existing dynamic dispatch mechanism (interfaces).
Source: Faster sorting with Go generics, an article by Eli Bendersky.