Memory overhead for trees?

François Pinard pinard at iro.umontreal.ca
Fri Aug 16 08:23:41 EDT 2002


[Paul Rubin]

> pinard at iro.umontreal.ca (François Pinard) writes:

> > I'm toying with the idea of converting an existing LISP system into
> > Python.  The system uses a lot of real trees, I mean, more deep than
> > wide on average.  Trees are traversed and explored a great deal, but
> > modified relatively less often.  I'm seeking a representation which,
> > while being reasonably efficient -- yet no miracles are expected here! --
> > is not too voracious on memory.

> If it's a binary tree that's reasonably balanced,

Oh, for this application, trees are not especially binary, many nodes are
likely to have many children.  Moreover, they are most likely not balanced
at all.  But trees might often be deep, they are not of the shallow type.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list