That is so far from the realm of possibility that it isn't worth discussing.the xor implementation seems slower by almost a factor of 3 than the division method
And it is garbage. Look at the massive overhead you've imposed!Here's my implementation of the XOR
Don't dare imply that filth came from me!mainly copied from your code but changing a couple of things
The only thing you've kept from my code is the idea.
The algorithm is at best always an "O(n)" job. What did you expect from a different implementation? You can only easily get a slight improvement by reducing instructions or using "cheaper" instructions. You've done neither of those.