Harmonize the bottom of the outer loop with its entry point

giving a small simplification.  Timings show that hash
pre-check seems only benefit the inner-loop (the linear probes).
This commit is contained in:
Raymond Hettinger 2015-06-21 10:47:20 -07:00
parent 2e2f374098
commit 7e3592dca6
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
i = (i * 5 + 1 + perturb) & mask;
entry = &table[i];
if (entry->hash == 0 && entry->key == NULL)
if (entry->key == NULL)
return entry;
}
}
@ -206,7 +206,7 @@ set_insert_key(PySetObject *so, PyObject *key, Py_hash_t hash)
i = (i * 5 + 1 + perturb) & mask;
entry = &table[i];
if (entry->hash == 0 && entry->key == NULL)
if (entry->key == NULL)
goto found_null;
}