Raymond Hettinger added the comment: Here's an excerpt from the patch that gives a pretty good idea of what is being changed (the three lines of new logic are marked):
static void set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash) { setentry *table = so->table; setentry *entry; size_t perturb = hash; size_t mask = (size_t)so->mask; size_t i, j; // the j variable is new i = j = (size_t)hash & mask; while(1) { entry = &table[j]; if (entry->key == NULL) break; entry = &table[j ^ 1]; // this line is new if (entry->key == NULL) // this line is new break; // this line new i = i * 5 + perturb + 1; j = i & mask; perturb >>= PERTURB_SHIFT; } so->fill++; entry->key = key; entry->hash = hash; so->used++; } ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18771> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com