Skip to content

bpo-37587: optimize json.loads for large string #15134

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

Merged
merged 2 commits into from
Aug 8, 2019

Conversation

methane
Copy link
Member

@methane methane commented Aug 5, 2019

Use a tighter scope temporary variable to help register allocation.

https://bugs.python.org/issue37587

@methane methane merged commit 2a570af into python:master Aug 8, 2019
@methane methane deleted the json-opt2 branch August 8, 2019 08:57
@pablogsal
Copy link
Member

@methane Should we backport this to 3.8? The other PR was indeed backported

@methane
Copy link
Member Author

methane commented Aug 9, 2019

I'm not sure. This is very small (1~3% in a specific case) or optimization.
Not so important.

lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
Use a tighter scope temporary variable to help register allocation.
1% speedup for large string.

Use PyDict_SetItemDefault() for memoizing keys.
At most 4% speedup when the cache hit ratio is low.
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Use a tighter scope temporary variable to help register allocation.
1% speedup for large string.

Use PyDict_SetItemDefault() for memoizing keys.
At most 4% speedup when the cache hit ratio is low.
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
Use a tighter scope temporary variable to help register allocation.
1% speedup for large string.

Use PyDict_SetItemDefault() for memoizing keys.
At most 4% speedup when the cache hit ratio is low.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants