Uh oh!
There was an error while loading. Please reload this page.
gh-118527: Intern code name and filename on default build - #118576
Conversation
Interned and non-interned strings are treated differently by `marshal`, so be consistent between the default and free-threaded build.
So to clarify, the risk here is that the default build will leak a bunch of names if code is created dynamically (by using How significant is the scaling improvement on the free-threading build? |
brandtbucher
commented
May 4, 2024
Honestly, I'm not too worried since we already intern names and constants and stuff. |
markshannon
commented
May 4, 2024
Do you have any numbers on how many extra strings this will intern? |
It's critical for some common patterns, although it's not the only critical bottleneck (there are other remaining bottlenecks too). For example: defrun_in_parallel():
deffoo():
passreturnfooIf
Running before this PR: 19419 (in the default build, as reported by |
markshannon
commented
May 5, 2024
The increase from 19419 to 19721 doesn't seem so bad, but it depends on the baseline. Can you get numbers for something like the mypy benchmark or a similar "realistic" program? |
colesbury
commented
May 6, 2024
|
colesbury
commented
May 6, 2024
And |
colesbury
commented
May 6, 2024
I'm going to go ahead and merge this as the increase seems small, especially for larger programs. |
…on#118576) Interned and non-interned strings are treated differently by `marshal`, so be consistent between the default and free-threaded build.
Interned and non-interned strings are treated differently by
marshal, so be consistent between the default and free-threaded build.