[plt-scheme] graphs / shared / memory!!

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Oct 20 23:04:42 EDT 2005

On Oct 20, 2005, at 9:21 PM, Yoav Goldberg wrote:

>>> (I wonder how Python's generators will match up.. I might write a
>>> python version tomorrow..)
>> Python uses reference counting. I'd say you start with
>> the circular graph version. Last time I talked to Guido
>> he didn't understand the value of garbage collection.
> Isn't the circular graph version is, in this case, just like the list 
> version?
> (I don't see how I can restrict the number of allowed traversal on a 
> circle...)
> About Python: I am curious about it because I think generators take a
> somewhat different approach - it's not really lazy, just a sequence
> with local state.. But you are probably right - it will be very hard
> to measure, because python is rather horrible with big lists anyhow.

I am thinking that your results will vary as you begin to measure
larger programs that tiny benchmarks. You will need to see how well
the gc deals with lists vs streams. In Python, you will lose cyclic
structures and it may bog down.

You can write a generator in mzscheme with call/cc.

-- Matthias

P.S. I was told in the meantime that Python mixed some form of gc into 
its ref counting scheme.

Posted on the users mailing list.