Mark Dickinson added the comment: > It would be crazy to not apply this little fix-up.
Crazy? How so? Note that this change, while introducing a performance enhancement in some rather unlikely corner cases, also introduces a performance regression in some other unlikely corner cases: Before the patch (2.7): iwasawa:cpython mdickinson$ ./python.exe -m timeit -s "a=7**10000; b=0; c=23" "pow(a, b, c)" 1000000 loops, best of 3: 0.232 usec per loop After the patch: iwasawa:cpython mdickinson$ ./python.exe -m timeit -s "a=7**10000; b=0; c=23" "pow(a, b, c)" 100000 loops, best of 3: 13.8 usec per loop That can be easily fixed with more special-casing and more code, but I don't think this sort of experimentation is appropriate for a bugfix branch. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19171> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com