Re:Go Data Structures: Interfaces
by tapirl on Sunday February 09, 2025 @01:56AM
(#42989007)
Storing concrete values into interfaces often cause allocations, which has a larger impact on performance than inlining.
[ Parent
| on HN ]
Re:Go Data Structures: Interfaces
by nasretdinov on Sunday February 09, 2025 @02:48AM
(#42989196)
Yeah I was really surprised by how much of a performance difference it made when calling variadic functions that support `args ...interface{}`. Literally every since call is going to be an allocation of multiple parameters when passing structs without a pointer