Open mdboom opened 1 year ago
From today's meeting, it was clarified that the goal is to modify upstream to more closely match the garbage collection behavior of the nogil branch (and then benchmark and compare that to the nogil branch).
Unfortunately, it's not as simple as decreasing the number of generations and changing the thresholds. The nogil branch seems to use a dynamic threshold, so it remains to be seen how easy this will be to backport...
I created a branch that uses a single generation with a threshold of 7000. There are far more changes to GC in nogil than that, but that's hopefully a useful approximation.
From that, you can see the effect of just increasing the garbage collection threshold vs. upstream.
The result of comparing nogil-latest against upstream with the higher gc thresholds is below. tl;dr: nogil is around 15% slower overall (mostly in single-threaded performance).
For completeness, here's the result of nogil-latest against the upstream where it branched off.
It would be worthwhile to remove the effect of the GC threshold changes in the nogil branch by benchmarking with a version where the thresholds are the same as upstream Python, can comparing this against both upstream Python and nogil-as-it-currently stands.