-
-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-111928: make "memo" dict local to scan_once call #112005
Conversation
aisk
commented
Nov 12, 2023
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: json: make "memo" dict local to scan_once call #111928
Thanks for the PR! This looks okay, but I worry there will be a performance regression. Do you know how much of a hit performance takes with this approach? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you like to add @colesbury as co-author since the PR is cherry-picked from his own repo?
Oh you did already.
@@ -0,0 +1 @@ | |||
Make the ``memo`` dict thread safe without the GIL in :mod:`json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NEWS.d is not needed since there is no user side changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lgtm.
@Fidget-Spinner, performance impact is <1% for parsing tiny strings of JSON (and less for larger JSON strings).
Meant to link to a quick and dirty JSON benchmark https://gist.github.com/colesbury/dd888920a1eacb97794fb6be2446dc10: |
…12005) Co-authored-by: Sam Gross <[email protected]>
…12005) Co-authored-by: Sam Gross <[email protected]>