Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes from1 commit
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
da57f0b
Streamline binary operations and creating new int objects for common …
markshannonAug 18, 2021
0533a9f
Make sure that all ints, even internal, temporary ones, have at least…
markshannonAug 19, 2021
9349daa
Readability improvements as suggested by Victor Stinner.
markshannonAug 19, 2021
96496e2
Prefix private function name with _
markshannonAug 19, 2021
5e4aad5
Reduce the number of casts.
markshannonAug 19, 2021
59ba476
Avoid casting away top bits.
markshannonAug 19, 2021
0d3ca1d
Streamline integer negation and invert a bit. Suggested by Mark Dicki…
markshannonAug 20, 2021
c73333b
Clarify comment and internal function name. Remove a bit of redundant…
markshannonAug 20, 2021
16d3167
Remove two more narrowing casts.
markshannonAug 20, 2021
f20a2a8
Change _PyLong_FromLarge to use correctly sized int.
markshannonAug 20, 2021
ab2b908
Avoid more narrowings.
markshannonAug 20, 2021
e43060a
Revert get_small_int to taking a sdigit. Place narrowing casts in cor…
markshannonAug 20, 2021
ed2a430
Use _PyLong_FromSTwoDigits not PyLong_FromLong in long_add.
markshannonAug 20, 2021
1f2d47c
Implement PyLong_FromLong separately from _PyLong_FromSTwoDigits to a…
markshannonAug 23, 2021
649c311
Don't overflow shift in PyLong_FromLong.
markshannonAug 23, 2021
a69f420
Convert IS_MEDIUM_INT macro to inline function.
markshannonAug 25, 2021
47571ff
Edit comment
markshannonAug 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
Edit comment
  • Loading branch information
@markshannon
markshannon committedAug 25, 2021
commit47571ffaeee4f9758876bb0de9e1e8ee594a36c7
3 changes: 1 addition & 2 deletionsObjects/longobject.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,8 +42,7 @@ medium_value(PyLongObject *x)

static inline int is_medium_int(stwodigits x)
{
/* We have to take care here to make sure that we are
* comparing unsigned values. */
/* Take care that we are comparing unsigned values. */
twodigits x_plus_mask = ((twodigits)x) + PyLong_MASK;
return x_plus_mask < ((twodigits)PyLong_MASK) + PyLong_BASE;
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp