4 ms·
> The use of Python’s context managers considerably reduces the size of the generated parsers for code clarity, and enhanced CPU-cache hits. I would love to he
by erezsh 4y ago
> The use of Python’s context managers considerably reduces the size of the generated parsers for code clarity, and enhanced CPU-cache hits.
I would love to hear more about how it affects cache hits.
- goldenkey 4y agoIt's just stack based memory that automatically cleans up. Given their storage on the stack (rather than heap), they have better cache properties. https://docs.python.org/3/library/contextlib.html https://docs.python.org/3/library/contextlib.html