Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d81def

Browse files
committed
Merged revisions 70647,70652 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r70647 | antoine.pitrou | 2009-03-28 20:10:13 +0100 (sam., 28 mars 2009) | 3 lines Publicize the GC untracking optimization ........ r70652 | antoine.pitrou | 2009-03-28 20:17:54 +0100 (sam., 28 mars 2009) | 3 lines Fix a typo and be more specific ........
1 parent 7a51e58 commit 9d81def

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Doc/whatsnew/2.7.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ A few performance enhancements have been added:
129129
(Suggested by Martin von Loewis and implemented by Antoine Pitrou;
130130
:issue:`4074`.)
131131

132+
* The garbage collector tries to avoid tracking simple containers which
133+
can't be part of a cycle. As of now, this is true for tuples and dicts
134+
containing atomic types (such as ints, strings, etc.). Transitively, a dict
135+
containing tuples of atomic types won't be tracked either. This helps bring
136+
down the individual cost of each garbage collection, since it decreases the
137+
number of objects to be considered and traversed by the collector.
138+
139+
To help diagnosing this optimization, a new function in the :mod:`gc`
140+
module, :func:`is_tracked`, returns True if a given instance is tracked
141+
by the garbage collector, False otherwise.
142+
(Contributed by Antoine Pitrou; :issue:`4688`.)
143+
132144

133145
.. ======================================================================
134146

0 commit comments

Comments
 (0)