Issue44590
Created on 2021-07-09 10:53 by Mark.Shannon, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 27077 | merged | Mark.Shannon, 2021-07-09 11:29 | |
| PR 27525 | closed | ncoghlan, 2021-08-01 08:30 | |
| Messages (4) | |||
|---|---|---|---|
| msg397196 - (view) | Author: Mark Shannon (Mark.Shannon) * ![]() |
Date: 2021-07-09 10:53 | |
In https://bugs.python.org/issue44032 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. |
|||
| msg398220 - (view) | Author: Mark Shannon (Mark.Shannon) * ![]() |
Date: 2021-07-26 10:22 | |
New changeset ae0a2b756255629140efcbe57fc2e714f0267aa3 by Mark Shannon in branch 'main': bpo-44590: Lazily allocate frame objects (GH-27077) https://github.com/python/cpython/commit/ae0a2b756255629140efcbe57fc2e714f0267aa3 |
|||
| msg398696 - (view) | Author: Alyssa Coghlan (ncoghlan) * ![]() |
Date: 2021-08-01 13:19 | |
The newly linked pull request isn't actually for this ticket, it's for bpo-44800, a follow-up refactoring proposal related to the variable, struct field, and API naming schemes used for the new lighter weight execution frames. However, the commit message and PR description refer back to this ticket as well, so the RoundUp automation picked it up. |
|||
| msg413798 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2022-02-23 15:14 | |
I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:47 | admin | set | github: 88756 |
| 2022-02-23 15:14:23 | vstinner | set | nosy:
+ vstinner messages: + msg413798 |
| 2021-08-01 13:19:21 | ncoghlan | set | messages: + msg398696 |
| 2021-08-01 08:30:36 | ncoghlan | set | nosy:
+ ncoghlan pull_requests: + pull_request26041 |
| 2021-08-01 01:48:47 | ncoghlan | link | issue44800 dependencies |
| 2021-07-29 10:31:08 | Mark.Shannon | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2021-07-26 10:22:28 | Mark.Shannon | set | messages: + msg398220 |
| 2021-07-09 11:29:13 | Mark.Shannon | set | keywords:
+ patch stage: patch review pull_requests: + pull_request25626 |
| 2021-07-09 10:53:40 | Mark.Shannon | create | |
