generics can make your code slower

Mar 31, 2022

Wonderful article, with really nice interactive breakdowns of how golang calls functions at the ASM level:

It looks quite familiar, but there’s a stark difference. Offset 0x0094 contains what we don’t want a function call-site to contain: another pointer dereference. The technical term for this is, again, a total bummer.

Even makes monomorphization seem like a nice simple term!

↑ up