[issue19171] pow() improvement on longs

Mark Dickinson report at bugs.python.org
Tue Oct 8 20:30:39 CEST 2013


Mark Dickinson added the comment:

No need to revert.  The improvement seems like a good one; I was just a bit surprised to see it land in the maintenance branches as well as the default branch.  My understanding was that minor performance improvements aren't normally candidates for inclusion in 2.7.  Maybe Benjamin can clarify the policy here.

> I don't care if the trivial exponent == 0 case slows down [...]

Sure; I guess my point was that even the simplest change can have unexpected / unintended consequences, which is one of the reasons that it makes sense to me to avoid non-bugfix changes in 2.7 / 3.3.

(We're not totally without use-cases for special-casing pow(a, 0, b), by the way:  such a pow operation occurs any time you do `hash(Decimal(some_integer))`, though admittedly not with an oversized a.)

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19171>
_______________________________________


More information about the Python-bugs-list mailing list