mirror of https://github.com/python/cpython
A hybrid of and-masking and a conditional-set-to-zero produce even faster search loop.
This commit is contained in:
parent
bd9b200b87
commit
ed741d4ff0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue