in reply to
Re: The golf course looks great, my swing feels good, I like my chances (Part II)
in thread The golf course looks great, my swing feels good, I like my chances (Part II)
I chose the "19&" version of a magic formula here only because the bitwise and & operator is typically faster than the modulo % operator. BTW, an interesting (non-golf) problem is to find the most efficient magic formula: for that, I expect you'd try to use "fast" operators (such as &, ^, |, >>), while avoiding "slow" ones (such as % and /).
Your criteria probably make sense if you are writing C code. I doubt they make sense when writing in any of the languages you are actually writing in.
In particular, in Perl your fastest formula is going to be the one with the fewest operations. Dispatching a Perl opnode is going to be (I'm guessing) two or three orders of magnitude slower than even something "slow" like a division machine-language instruction.