[issue22501] Optimise PyLong division by 1 or -1
STINNER Victor
report at bugs.python.org
Fri Sep 26 10:54:19 CEST 2014
STINNER Victor added the comment:
I proposed an optimization for "x << 0" (as part of a larger patch to optimize 2 ** x) but the issue was rejected:
http://bugs.python.org/issue21420#msg217802
Mark Dickson wrote (msg217863):
"There are many, many tiny optimisations we *could* be making in Objects/longobject.c; each of those potential optimisations adds to the cost of maintaining the code, detracts from readability, and potentially even slows down the common cases fractionally. In general, I think we should only be applying this sort of optimization when there's a clear benefit to real-world code. I don't think this one crosses that line."
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22501>
_______________________________________
More information about the Python-bugs-list
mailing list