Skip to content

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

Merged
methane merged 2 commits into
python:masterfrom
methane:json-opt2
Aug 8, 2019
Merged

methane merged 2 commits into
python:masterfrom
methane:json-opt2

Conversation

@methane

@methane methane commented Aug 5, 2019 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@methane

methane commented Aug 9, 2019

Copy link
Copy Markdown
Member Author

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