]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-37587: optimize json.loads (GH-15134)
authorInada Naoki <songofacandy@gmail.com>
Thu, 8 Aug 2019 08:57:10 +0000 (17:57 +0900)
committerGitHub <noreply@github.com>
Thu, 8 Aug 2019 08:57:10 +0000 (17:57 +0900)
commit2a570af12ac5e4ac5575a68f8739b31c24d01367
tree0f1714b6c8defe05ac81bc17863d6eb479117e04
parente43e7ed36480190083740fd75e2b9cdca72f1a68
bpo-37587: optimize json.loads (GH-15134)

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.
Modules/_json.c