News for hackers. Stuff that matters.
Re:Go 1.20 Released by valyala on Friday February 03, 2023 @01:53AM (#34637973)
That's a good example of using generics-based sorting! I think it would be more beneficial to work on compiler optimizations, which could optimize the standard interface-based sort.Slice and sort.Sort to the same level. This shouldn't be too hard to do for the most widespread case when the compiler knows the actual type hidden behind the sort.Interface, so it could inline methods of this interface.

This optimization then could speed up other similar interface-based algorithms.

There are no comments on this comment yet.