Commit 63d1ff2a authored by Raymond Hettinger's avatar Raymond Hettinger

Convert one more division to unsigned arithmetic to speed-up deque_item().

parent 6ab0ec93
......@@ -788,7 +788,9 @@ deque_item(dequeobject *deque, Py_ssize_t i)
while (n--)
b = b->rightlink;
} else {
n = (deque->leftindex + Py_SIZE(deque) - 1) / BLOCKLEN - n;
n = (Py_ssize_t)(
((unsigned)(deque->leftindex + Py_SIZE(deque) - 1))
/ BLOCKLEN - n);
b = deque->rightblock;
while (n--)
b = b->leftlink;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment