2 ms·
While the papers mentions odd numbers as a possible special case in a sidenote, the real special case is x=0. The given expression size_t i = ((x & -x) * d
by tromp 8y ago
While the papers mentions odd numbers as a possible special case in a sidenote, the real special case is x=0.
The given expression
size_t i = ((x & -x) * debruijn) >> 27;
treats x=0 the same as odd x, since 0debruijn>>27 == 1debruijn>>27 == 0.