• Inada Naoki's avatar
    bpo-37587: optimize json.loads (GH-15134) · 2a570af1
    Inada Naoki authored
    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.
    2a570af1
_json.c 60.2 KB