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-161661: json.dumps use a single dict probe for circular-reference markers by aivarsk · Pull Request #161662 · python/cpython Conversation
|
|
This adds a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The synthetic test with a lot of containers there is improvement for free-threading as well but a bit smaller. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
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) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
FTR, please don't add attachments. Users usually don't want to download code so prefer using inline blocks (in a |
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.
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
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
How does this compare to using a set? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think you can also check the size before and after adding the element. |
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.