mirror of
https://github.com/python/cpython.git
synced 2025-10-27 11:44:39 +00:00
We tried this before with a dict and for all interned strings. That ran into problems due to interpreter isolation. However, exclusively using a per-interpreter cache caused some inconsistency that can eliminate the benefit of interning. Here we circle back to using a global cache, but only for statically allocated strings. We also use a more-basic _Py_hashtable_t for that global cache instead of a dict. Ideally we would only have the global cache, but the optional isolation of each interpreter's allocator means that a non-static string object must not outlive its interpreter. Thus we would have to store a copy of each such interned string in the global cache, tied to the main interpreter. |
||
|---|---|---|
| .. | ||
| check_extension_modules.py | ||
| deepfreeze.py | ||
| freeze_modules.py | ||
| generate_global_objects.py | ||
| generate_levenshtein_examples.py | ||
| generate_opcode_h.py | ||
| generate_re_casefix.py | ||
| generate_sre_constants.py | ||
| generate_stdlib_module_names.py | ||
| generate_token.py | ||
| parse_html5_entities.py | ||
| smelly.py | ||
| stable_abi.py | ||
| umarshal.py | ||
| update_file.py | ||
| verify_ensurepip_wheels.py | ||