Uh oh!
There was an error while loading. Please reload this page.
gh-103092: isolate _lsprof - #115130
Conversation
erlend-aasland
commented
Feb 9, 2024
Thanks; can you split out the Argument Clinic adaption and contribute that as a separate PR? |
Sure, see #115242 . |
aisk
commented
Feb 11, 2024
Hi @erlend-aasland, I have a new thought. This change is just to isolate these two static variables: cpython/Modules/rotatingtree.c Lines 11 to 12 in 1a6e213 But as they are the state of a pseudo-random generator, they can be shared between interpreters under a lock. For single interpreter usage, there is no noticeable performance decrease. And this work can be done easily. I have no idea if this approach is acceptable, or whether we should continue with the previous work. If it does, I can do some benchmarking to see if there is a performance decrease in multiple isolated interpreters usage. |
erlend-aasland
commented
Feb 11, 2024
Sounds reasonable. Go ahead! |
erlend-aasland
commented
Feb 29, 2024
Superseded by #115301 |
The main change is moving the static variables
random_valueandrandom_streaminrotatingtree.cto a struct and storing it in the module's state.Other changes are to pass the struct from the module's state.