This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon, gvanrossum, pablogsal
Date 2021-07-09.10:53:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In we moved most of the data in the frame stack, that is the locals, stack, and "specials" (globals, builtins, code etc), from the heap allocated stack to a (mostly) contiguous array in memory.
That offered some speed up due to better cache locality, and faster allocation of frame objects (they are now fixed size so can use a simple freelist).

However, data is still split between the stack allocated frame and the heap allocated frame.

We should move the remaining data to the stack and only allocate heap objects lazily when needed for tracebacks and the like. This should improve performance further by removing the vast majority of heap frame allocations and further improving locality of reference.

Not only does this have immediate performance benefits, it also paves the way for even better Python-to-Python calls by allowing stack frames to overlap and pass arguments with the minimal amount of copying and INCREF/DECREF pairs.
Date User Action Args
2021-07-09 10:53:40Mark.Shannonsetrecipients: + Mark.Shannon, gvanrossum, pablogsal
2021-07-09 10:53:40Mark.Shannonsetmessageid: <>
2021-07-09 10:53:40Mark.Shannonlinkissue44590 messages
2021-07-09 10:53:40Mark.Shannoncreate