[Python-Dev] CPython optimization: storing reference counters outside of objects

Stefan Behnel stefan_ml at behnel.de
Tue May 24 14:05:26 CEST 2011


Maciej Fijalkowski, 24.05.2011 13:31:
> CPython was not designed for CPU cache usage as far as I'm aware.

That's a pretty bold statement to make on this list. Even if it wasn't 
originally "designed" for (efficient?) CPU cache usage, it's certainly been 
around for long enough to have received numerous performance tweaks in that 
regard.

I doubt that efficient CPU cache usage was a major design goal of PyPy 
right from the start. IMHO, the project has changed its objectives way too 
many times to claim something like that, especially at the low level where 
the CPU cache becomes relevant. I remember that not so long ago, PyPy was 
hugely memory hungry compared to CPython. Although, one could certainly 
call *that* "designed for CPU cache usage"... ;)

Stefan



More information about the Python-Dev mailing list