Mark Dickinson <dicki...@gmail.com> added the comment:

Thank you for the proposal and PR!

There are some tradeoffs to be considered here, between simplicity and 
performance; it's not always trivial to find the sweet spot.  Python's int 
implementation mostly favours the simplicity end of the spectrum. It's also 
focused on the sort of integer sizes that turn up in everyday problems, rather 
than crypto-sized (or worse, number-theoretic-sized) integers - those are more 
the province of libraries like cryptlib and GMP. That's why Python still has 
quadratic-time division and base-conversion algorithms.

For this particular case, my feeling is that the added complexity (~300 lines 
of C code) isn't worth the payoff.

That said, the existing integer powering implementation, like much else in 
longobject.c, goes back to Tim Peters. If Tim wants to champion this change and 
push it forward, I'm certainly not going to oppose that.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42911>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to