Repository navigation
Conversation
0e056ec to
7fa0231
Compare
|
This adds a |
|
The synthetic test with a lot of containers there is improvement for free-threading as well but a bit smaller. |
|
What about pyperformance's JSON benchmark? And how is the synthetic benchmark done? (PGO+LTO? release build? pyperf or time? if it's timeit, use pyperf instead) |
|
The built was just a plain -O3, no PGO+LTO. The existing pyperformance cases did show 0.x improvement but that's insignificant. Could be noise in eiter direction, as this is my laptop. |
|
FTR, please don't add attachments. Users usually don't want to download code so prefer using inline blocks (in a |
picnixz
left a comment
There was a problem hiding this comment.
I think the change could be done but at the same time, I'd prefer not touching code that has been settled for a while especially considering the lack of significant performance in either direction.
So I'll defer the final decision to @serhiy-storchaka
|
How does this compare to using a set? |
|
@nineteendo haven't tried it because markers is a dict and here it's a minimal change without API changes I came up with during #137103. If API change is on the table I think limiting recursion depth like other libraries do is the best way. |
|
I think you can also check the size before and after adding the element. |
One less hash calculation and lookup per circular reference check.