Re:Interface Dispatch (2018)
by Insanity on Thursday April 18, 2019 @09:05AM
(#19690666)
Well the code is the same for all of them (but when using a bool map we assign true instead of empty struct). So we run this code inside a benchmarking function:
edit: fix code.
[ Parent
| on HN ]
I'm speculating, but sizeof(bool) == 1, sizeof(struct{}) == 0 and sizeof(interface{}) == 8, so might be as simple as that.