
On Wed, Mar 23, 2022 at 12:59 AM Jonathan Fine <jfine2358@gmail.com> wrote:
Does anyone know of any work that's been done to research or make critical Python code and data smaller so that more of it fits in the CPU cache? I'm particularly interested in measured benefits.
I reduced the size of namespace dict in Python 3.11. This will increase the cache efficiency. https://bugs.python.org/issue46845 And I deprecated the cached hash in bytes object. It will removed in Python 3.13 if no objections. Bytes objects are used to bytecode, so this will increase cache efficiency too. Sadly, I can not confirm the benefits. We have macro benchmark (pypeformance), but it is still small. Most hot data fits into L2 cache. Regards, -- Inada Naoki <songofacandy@gmail.com>