Re: GC performance with lists

2007-09-04 Thread Zentrader
On Sep 4, 9:27 am, "John Krukoff" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > > Sent: Tuesday, September 04, 2007 8:07 AM > > To: [EMA

RE: GC performance with lists

2007-09-04 Thread John Krukoff
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > Sent: Tuesday, September 04, 2007 8:07 AM > To: python-list@python.org > Subject: GC performance with lists > > While working on some python wrap

Re: GC performance with lists

2007-09-04 Thread Zentrader
On Sep 4, 7:06 am, [EMAIL PROTECTED] wrote: One thing to do is to calc i+1 etc before the j loop instead of on every iteration. That is, calculate 600,000 times instead of 6*57*100,000=34,200,00, And in today's world, it probably won't make a lot of difference, This is not related to gc but is a

GC performance with lists

2007-09-04 Thread jonas
While working on some python wrapping, I've run into some problems where the GC seems to take an unreasonable amount of time to run. The code below is a demonstration: import gc #gc.disable() data = [] for i in xrange(10): shortdata = [] for j in range(57): mytuple = (j, i+1,