[issue1492860] Integer bit operations performance improvement.
Mark Dickinson
report at bugs.python.org
Sat Mar 21 16:52:00 CET 2009
Mark Dickinson <dickinsm at gmail.com> added the comment:
To see what Tim's talking about here, see the 'big switch' ("switch
opcode") in function PyEval_EvalFrameEx in Python/ceval.c, and look at the
"case BINARY_ADD" bit. Inlining the bitwise operators should be even
easier, since there are no overflow worries. (We do have to assume that C
longs are two's-complement with no trap representation, but
Objects/intobject.c does that already, so it's probably okay.)
This only applies to 'short' integers, so I don't think it's relevant for
Python 3.x.
----------
keywords: +easy
stage: test needed -> needs patch
versions: -Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1492860>
_______________________________________
More information about the Python-bugs-list
mailing list