On Jul 16, 2013, at 2:57 PM, Guy Steele <[email protected]> wrote: > . . . > So here's the punchline: this change makes my Monte Carlo calculation of pi > run over 19% faster! > Hard to believe. It's certainly avoiding most of the hard work in > addGammaModGeorge, > and perhaps also making branch prediction totally win, but 19% ??? Someone > please verify this > independently.
I ran more tests. Using 60-bit gamma values, the improvement is about 14-15%. Using 56-bit gamma values, the improvement is about 19-20%, as already reported. Using 52-bit gamma values, the improvement is about 19-20%. So, as expected, there is a knee in the curve, and 56-bit values are about right. But I should check 57, 58, and 59 bits. > Still to be done: (a) verify avalanche behavior of mix56; (b) run more > DieHarder tests. And (c), look again at the mathematical proofs and see whether limiting the range of gamma values adversely affects the likelihood of hitting a bad case (different pedigrees producing duplicate values). --Guy
