mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue18771: Reduce the cost of hash collisions for set objects.
This commit is contained in:
parent
319f3a10f9
commit
3c0a4f5def
2 changed files with 88 additions and 22 deletions
|
@ -51,9 +51,9 @@ struct _setobject {
|
|||
*/
|
||||
setentry *table;
|
||||
setentry *(*lookup)(PySetObject *so, PyObject *key, Py_hash_t hash);
|
||||
Py_hash_t hash; /* only used by frozenset objects */
|
||||
setentry smalltable[PySet_MINSIZE];
|
||||
|
||||
Py_hash_t hash; /* only used by frozenset objects */
|
||||
PyObject *weakreflist; /* List of weak references */
|
||||
};
|
||||
#endif /* Py_LIMITED_API */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue