Commit ed741d4f authored by Raymond Hettinger's avatar Raymond Hettinger

A hybrid of and-masking and a conditional-set-to-zero produce even faster search loop.

parent bd9b200b
......@@ -671,7 +671,8 @@ set_pop(PySetObject *so)
while ((entry = &so->table[i])->key == NULL || entry->key==dummy) {
i++;
i &= so->mask;
if (i > so->mask)
i = 0;
}
key = entry->key;
entry->key = dummy;
......
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