2 ms·
> I prefer the more explicit form Huh? It's not explicit, the purpose is implicit. You are writing down an algorithm that implements a popcount algorithm.
by mpweiher 9y ago
> I prefer the more explicit form
Huh? It's not explicit, the purpose is implicit. You are writing down an algorithm that implements a popcount algorithm. The compiler than has to infer the fact that you actually wanted popcount (maybe you just wanted to waste a bit of time in a timing loop?) and then substitute something based on that inference.
I am all for it being explicit, i.e. some library function that has a name that somewhere mentions "popcount" or some such. Then have the compiler generate whatever code it needs for that function.