[Python-Dev] reusing frames (original) (raw)
Jewett, Jim J jim.jewett at eds.com
Thu Mar 4 13:34:19 EST 2004
- Previous message: [Python-Dev] [ python-Patches-876206 ] scary frame speed hacks
- Next message: [Python-Dev] Re: [Python-checkins] python/dist/src README, 1.179, 1.180
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
What are the savings from already having (today) "a frame", as opposed to (proposed) "a frame for this code"?
If much of the work is to create "a frame", then it might be bad to reserve frames for only the function that created them. (i.e., is reinitializing a generic frame twice still faster than creating a new frame from scratch.)
If it does make sense to create more frames, is there any reason they couldn't be tied to the code object by a weak reference? The reuse could still happen if there was no garbage collection in between, but code used in initialization won't keep its frames around forever.
I suppose further tuning could protect frames from gc level < n, or "free" them back to a generic frame pool instead of a generic memory pool.
-jJ
- Previous message: [Python-Dev] [ python-Patches-876206 ] scary frame speed hacks
- Next message: [Python-Dev] Re: [Python-checkins] python/dist/src README, 1.179, 1.180
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]