8000 bpo-46055: Streamline inner loop for right shifts by mdickinson · Pull Request #30243 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46055: Streamline inner loop for right shifts #30243

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
merged 6 commits into from
Dec 27, 2021
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Remove unnecessary parentheses
  • Loading branch information
mdickinson committed Dec 23, 2021
commit 76e9a487c7be6525d927de99f2045259ee1e7509
2 changes: 1 addition & 1 deletion Objects/longobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -4516,7 +4516,7 @@ long_rshift1(PyLongObject *a, Py_ssize_t wordshift, digit remshift)
j = wordshift;
twodigits acc = a->ob_digit[j++] >> remshift;
for (i = 0; j < Py_SIZE(a); i++, j++) {
acc |= ((twodigits)(a->ob_digit[j]) << hishift);
acc |= (twodigits)(a->ob_digit[j]) << hishift;
z->ob_digit[i] = acc & PyLong_MASK;
acc >>= PyLong_SHIFT;
}
Expand Down
0