On 26/02/2018 17:05, Ben Bacarisse wrote:
bartc <b...@freeuk.com> writes:

A C version is given below. (One I may have messed around with, which
I'm not sure works properly. For an original, google for Marsaglia and
KISS64 or SUPRKISS64.)

The version I know uses unsigned integers.  Did you change then to signed?

Yeah, I don't know what I was doing with that version.

For a Python version, go back to the original C and work from there.

The original C makes confusing use of macros and comma operators.

A version without macros or comma expressions is here (tweaked from generated C):

  https://pastebin.com/raw/k4jFK5TN

This runs the 1-billion loop in 6 seconds.

--
bartc
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to