> >>Eliminating the blockstack would be nice (esp. if it's enough to get
> >>frames small enough that they get allocated by PyMalloc) but this
> >>seemed to be tricky too (or at least Armin, Samuele and I spent a
> >>cuple of hours yakking about it on IRC and didn't come up with a clear
> >>approach).  Dynamically allocating the blockstack would be simpler,
> >>and might acheive a similar win.  (This is all from memory, I haven't
> >>thought about specifics in a while).

I don't know if this helps, but since I invented the block stack
around 1990, I believe I recall the main reason to make it dynamic was
to simplify code generation, not because it is inherently dynamic. At
the time an extra run-time data structure seemed to require less
coding than an extra compile-time data structure. The same argument
got me using dicts for locals; that was clearly a bottleneck and
eliminated long ago, but I think we should be able to lose the block
stack now, too. Somewhat ironically, eliminating the block stack will
reduce the stack frame size, while eliminating the dict for locals
added to it. :-)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to