[Python-Dev] CPython optimization: storing reference counters outside of objects
stefan_ml at behnel.de
Tue May 24 15:01:49 CEST 2011
Antoine Pitrou, 24.05.2011 14:32:
> On Tue, 24 May 2011 14:05:26 +0200Stefan Behnel wrote:
>> 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"... ;)
> Well, to be honest, "hugely memory hungry" doesn't necessarily mean
> cache-averse. It depends on the locality of memory access patterns.
Sure. AFAIR (and Maciej is certainly the right person to prove me wrong),
the problem at the time was that the overall memory footprint of objects
was too high. That, at least, speaks against efficient cache usage and
makes it's more likely to result in cache thrashing.
In any case, we're talking about a historical problem they already fixed.
More information about the Python-Dev