New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a potential future bug and an optimization that mostly undermines performance in long_invert #71401
Comments
------------ the current state ------------ In other words, long_invert assumes long_add hasn't returned a reference to an element of small_ints. In addition, because long_invert first checks whether v is a single-digit int, calling maybe_small_long before returning would save up memory only in case both of the following conditions are true: ------------ the proposed changes ------------
------------ diff ------------ ------------ tests ------------ In addition, I ran 'python_d.exe -m test -j3' (on my 64-bit Windows 10) with and without the patches, and got quite the same output. |
New changeset 6e1d38674b17 by Mark Dickinson in branch 'default': |
Agreed with the analysis and proposed solution. Thanks! |
Thanks for the review, Mark :) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: