GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — gh-143421: Lazily allocate tracer code and opt buffers by Fidget-Spinner · Pull Request #143597 · python/cpython Conversation
|
|
Should we remove the newly added |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Let's keep it. It's a good refactor. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| // Holds locals, stack, locals, stack ... co_consts (in that order) | ||
| #define MAX_ABSTRACT_INTERP_SIZE 4096 | ||
| // Holds locals, stack, locals, stack ... (in that order) | ||
| #define MAX_ABSTRACT_INTERP_SIZE 512 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This number was picked arbitrarily by me back then when I first wrote this. I now realise it's overkill. We don't need 3 pages of memory just to store locals and stack. It's slow and wastes memory.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This makes no sense to me. How is allocating the necessary memory piecemeal faster than allocating it in a single chunk? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@markshannon no the problem was embedding it as a part of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The benchmark doesn't run any work to use the JIT, instead it just measures thread startup overhead https://github.com/python/pyperformance/blob/main/pyperformance/data-files/benchmarks/bm_concurrent_imap/run_benchmark.py#L19 Embedding the two structs together in the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It shouldn't be embedded, it should be heap allocated as one |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ok let me just put a up a PR to do that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.