News for hackers. Stuff that matters.
Re:Generics can make your Go code slower by addcninblue on Wednesday March 30, 2022 @01:40PM (#30858372)
Is it the expected outcome? I was under the initial impression that the author also noted:

> Overall, this may have been a bit of a disappointment to those who expected to use Generics as a powerful option to optimize Go code, as it is done in other systems languages.

where the implementation would smartly inline code and have performance no worse than doing so manually. I quite appreciated the call to attention that there's a nonobvious embedded footgun.

(As a side note, this design choice is quite interesting, and I appreciate the author diving into their breakdown and thoughts on it!)

There are no comments on this comment yet.