> [Skip] > > Why not a list of pre-made frames for each code block (default length > 1)? > > Or, IOW, per-code-block frame freelists (plural). Recursive generators > have > gotten quite popular in my code <wink>. > > BTW, if a gazillion distinct functions run when starting up a large app, > do > we hang on to the memory for their gazillion distinct frames forever? > Recycling from a common frame pool has memory benefits in cases other than > just recursion. Experiment: run test.py from a Zope 2 or Zope 3 > checkout, > and look at highwater memory consumption with and without the patch. We should look at keeping the freelist and when a code block needs a frame, it can request the one that it last used if available. Roughly: def getblock(idnum): if idnum in freelist: return freelist[id] if len(freelist): return freelist.pop() return makeNewFrame() Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4