[Patches] [ python-Patches-868736 ] Add GC collection to timeit

SourceForge.net noreply at sourceforge.net
Thu Jan 1 03:54:50 EST 2004


Patches item #868736, was opened at 2004-01-01 03:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=868736&group_id=5470

Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Raymond Hettinger (rhettinger)
Assigned to: Guido van Rossum (gvanrossum)
Summary: Add GC collection to timeit

Initial Comment:
This patch adds a gc.collect() before each timing.

Since timings are only relevant when compared to other
timings, it makes sense to put them on as equal footing
as possible.  Running a gc.collect() before each timing
provides some assurance that a routine gc collection
won't throw-off one timing while not affecting another.

At worst, this patch does nothing.  At best, it makes
the timings more comparable.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=868736&group_id=5470



More information about the Patches mailing list