Remove unneeded dummy test from the set search loop (when the hashes match we know the key is not a dummy).

This commit is contained in:
Raymond Hettinger 2015-01-26 21:54:35 -08:00
parent 3037e84ad1
commit a5ebbf6295
2 changed files with 15 additions and 5 deletions

View file

@ -14,7 +14,10 @@ extern "C" {
2. Active: key != NULL and key != dummy
3. Dummy: key == dummy
The hash field of Unused or Dummy slots have no meaning.
The hash field of Unused slots have no meaning.
The hash field of Dummny slots are set to -1
meaning that dummy entries can be detected by
either entry->key==dummy or by entry->hash==-1.
*/
#define PySet_MINSIZE 8