On Wed, Oct 22, 2014 at 4:43 AM, Tim Chase <python.l...@tim.thechases.com> wrote: > On 2014-10-22 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' >> 10000000 loops, best of 3: 0.124 usec per loop >> $ python3 -m timeit -s 'a = 10**100' 'a & 1' >> 10000000 loops, best of 3: 0.124 usec per loop >> $ python3 -m timeit -s 'a = 10**1000' 'a & 1' >> 10000000 loops, best of 3: 0.122 usec per loop > > Just for the record, this is a one-bit even/odd check
Which is just a verbose way of writing "parity check", even if that phrase is usually used in another context. -- https://mail.python.org/mailman/listinfo/python-list