3 ms·
Because Go Gc amd64 target supports CPUs that do not have support for the popcnt instruction and runtime detection + checking a bool around each popcnt instruct
by smartisch 6y ago
Because Go Gc amd64 target supports CPUs that do not have support for the popcnt instruction and runtime detection + checking a bool around each popcnt instruction is a big overhead. There is no mtune or march for Go Gc amd64 like (Go) gcc does.
- pantalaimon 6y agoHuh, TIL. I always assumed this to be a rather old instruction, but turns out it was only added fairly recently on x86 https://vaibhavsagar.com/blog/2019/09/08/popcount/ https://vaibhavsagar.com/blog/2019/09/08/popcount/