[Python-Dev] Opcode cache in ceval loop (original) (raw)

Sven R. Kunze srkunze at mail.de
Mon Feb 1 16:02:24 EST 2016


On 01.02.2016 21:35, Yury Selivanov wrote:

It's important to understand that if we have a lot of cache misses after the code object was executed 1000 times, it doesn't make sense to keep trying to update that cache. It just means that the code, in that particular point, works with different kinds of objects.

So, the assumption is that the code makes the difference here not time. That could be true for production code.

FWIW, I experimented with different ideas (one is to never de-optimize), and the current strategy works best on the vast number of benchmarks.

Nice.

Regarding the magic constants (1000, 20) what is the process of updating them?

Best, Sven



More information about the Python-Dev mailing list