summaryrefslogtreecommitdiff
path: root/Include/dictobject.h
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-03-23 18:41:45 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2009-03-23 18:41:45 +0000
commit0bec59d2f5c07aa8d42f9c92c9a0c6f251a2ac3e (patch)
tree25001d35044ad2d952c4015dde45cd903a150536 /Include/dictobject.h
parentede208b1fbd6ff732053c0203a400eb326b61e26 (diff)
downloadcpython-0bec59d2f5c07aa8d42f9c92c9a0c6f251a2ac3e.tar.gz
Issue #4688: Add a heuristic so that tuples and dicts containing only
untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes. (trivia: this makes the "binary_trees" benchmark from the Computer Language Shootout 40% faster)
Diffstat (limited to 'Include/dictobject.h')
-rw-r--r--Include/dictobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h
index b83cd0e893..06e0a7ebe7 100644
--- a/Include/dictobject.h
+++ b/Include/dictobject.h
@@ -111,6 +111,7 @@ PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp);
PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key);
PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, long hash);
PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
+PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp);
/* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */
PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other);