[Python-bugs-list] [ python-Bugs-574140 ] Major GC related performance regression

noreply@sourceforge.net noreply@sourceforge.net
Wed, 26 Jun 2002 08:47:18 -0700


Bugs item #574140, was opened at 2002-06-26 10:46
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=574140&group_id=5470

Category: Python Interpreter Core
Group: Python 2.3
>Status: Deleted
>Resolution: Duplicate
Priority: 5
Submitted By: Kevin Jacobs (jacobs99)
Assigned to: Nobody/Anonymous (nobody)
Summary: Major GC related performance regression

Initial Comment:
A change in the Python 2.3 CVS tree has resulted
in a major performance regression.  It shows up
when allocating large lists of objects, but only when
the garbage collector is enabled.  I've attached a simple
script that I use to measure the time it takes to
incrementally append a large number of objects into
a single Python list.   For previous versions of
Python (up to and including 2.2.1), the time scaled
linearly with the number of elements added to the
list (or close enough for the list sizes considered).  
However, with the Python 2.3 CVS version,
the time required to build the list scales quadratically.

Here is the core of my benchmark:
  rows = []
  start = time.time()
  for i in indices:
    rows.append( (1,) )

See the attached file for the full source as well
as timing results for several versions of Python
with and without garbage collection enabled.


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

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