Integer addition and XOR both take 1 clock cycle on most modern processors. They are equally fast. The modulo goes automatically and takes no extra time. I often prefer addition because the carries generate some extra diffusion from the lower bits to the higher bits. The Xorshift1024 generator looks good. I would rather combine it with the Mother-of-all generator than with the Well generator, because the xor-shift generator and the Well generator both depend mainly on finite field algebra. You should rather combine two generators that use different principles. For large applications with multiple threads you may want to use generators with very long cycle lengths. See my article digitalcommons.wayne.edu/jmasm/vol14/iss1/23/ |