-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-44946: Streamline operators and creation of ints for common case of single 'digit'. #27832
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
Merged
markshannon
merged 17 commits into
python:main
from
faster-cpython:streamline-medium-ints
Aug 25, 2021
Merged
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
da57f0b
Streamline binary operations and creating new int objects for common …
markshannon 0533a9f
Make sure that all ints, even internal, temporary ones, have at least…
markshannon 9349daa
Readability improvements as suggested by Victor Stinner.
markshannon 96496e2
Prefix private function name with _
markshannon 5e4aad5
Reduce the number of casts.
markshannon 59ba476
Avoid casting away top bits.
markshannon 0d3ca1d
Streamline integer negation and invert a bit. Suggested by Mark Dicki…
markshannon c73333b
Clarify comment and internal function name. Remove a bit of redundant…
markshannon 16d3167
Remove two more narrowing casts.
markshannon f20a2a8
Change _PyLong_FromLarge to use correctly sized int.
markshannon ab2b908
Avoid more narrowings.
markshannon e43060a
Revert get_small_int to taking a sdigit. Place narrowing casts in cor…
markshannon ed2a430
Use _PyLong_FromSTwoDigits not PyLong_FromLong in long_add.
markshannon 1f2d47c
Implement PyLong_FromLong separately from _PyLong_FromSTwoDigits to a…
markshannon 649c311
Don't overflow shift in PyLong_FromLong.
markshannon a69f420
Convert IS_MEDIUM_INT macro to inline function.
markshannon 47571ff
Edit comment
markshannon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.