:)
What I was suggesting was something like this (in pseudocode):
int previous_leftmost = 64;
while (mask != 0) {
leftmost = find_leftmost(mask);
mask ^= 1u << leftmost;
while (--previous_leftmost > leftmost)
func_false(previous_leftmost);
func_true(leftmost);
}
I wonder how using that would compare?
You'd find the leftmost bit, invoke the func_true for that, and clear the leftmost bit.
Then loop finding the leftmost bit, invoking the func_false for the bits between the current leftmost bit and the previous leftmost bit, func_true for the leftmost bit, and then clear that bit.
I wouldn't expect it to be dramatically different, but it is trading test and clear on the off bits and a conditional branch off of the result for a loop calling func_false a predetermined number of times. One of those options might be a little faster than the other.
[1] https://en.wikipedia.org/wiki/Find_first_set#Hardware_suppor...
[2] https://en.wikipedia.org/wiki/Find_first_set#Tool_and_librar...
The problem is that most people are not exposed to real-life English. It's either quite artificial language during classes or well spoken lines in movies. Words are spoken slower and clearer. Native speakers speak fast, use linking, colloquial language, multitude of idioms, phrasal verbs, and tons of stuff never ever touched during classes.