[issue42911] Addition chains for pow saves 5-20% time for pow(int, int)

2021-02-01 Thread Mark Dickinson
Mark Dickinson added the comment: Looks like Tim isn't taking the bait. :-) @Jurjen: Thank you for the suggestion and PR, but I'm going to close here; for me this ends up on the wrong side of the performance / complexity trade-off. -- resolution: -> rejected stage: patch review -> r

[issue42911] Addition chains for pow saves 5-20% time for pow(int, int)

2021-01-21 Thread Jurjen N.E. Bos
Jurjen N.E. Bos added the comment: ...not to mention the new gcd and lcm functions, and the fact that the number conversion is linear for exponent-of-two bases, and the negative power modulo a prime number! -- ___ Python tracker

[issue42911] Addition chains for pow saves 5-20% time for pow(int, int)

2021-01-21 Thread Jurjen N.E. Bos
Jurjen N.E. Bos added the comment: Well, I would argue that there is already quite a work going to for crypto-sized computations in the integer code, as well as the crypto-oriented .bit_count() function that was recently added. For starters, the arguably crypto-oriented three argument pow()

[issue42911] Addition chains for pow saves 5-20% time for pow(int, int)

2021-01-15 Thread Mark Dickinson
Mark Dickinson 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

[issue42911] Addition chains for pow saves 5-20% time for pow(int, int)

2021-01-15 Thread Jurjen N.E. Bos
Change by Jurjen N.E. Bos : -- title: Addition chains for pow saves 10 % time! -> Addition chains for pow saves 5-20% time for pow(int,int) ___ Python tracker ___