On Oct 22, 2014, at 12:29, Peter Otten wrote: > That looks like log(a) while a parity check takes constant time: > $ python3 -m timeit -s 'a = 10**10' 'a & 1'
Do you mean 'parity' as in http://en.wikipedia.org/wiki/Parity_bit ? Because a parity bit denotes whether the *number* of '1' bits is even or odd, not the value of the least significant bit. Greetings, -- "You can't actually make computers run faster, you can only make them do less." - RiderOfGiraffes -- https://mail.python.org/mailman/listinfo/python-list