Getting rid of bitwise operators in Python 3?

Paul Rubin http
Sat Sep 22 23:46:21 EDT 2007


richyjsm at gmail.com writes:
> Well okay, I take that back---I wouldn't mind *writing* it;  I just
> wouldn't expect to get much speed from *running* it. 

I don't see why not.  It's just the basic Python long arithmetic which
is coded in C.  I tested it against gmpy (carefully written asm code
and tuned algorithms) and gmpy's modexp was around 4x faster, but
Python's is plenty fast enough for many purposes.  The 4x ratio is
certainly lower than the usual ratio between Python code and C code.



More information about the Python-list mailing list