On 2016-02-01 4:02 PM, Sven R. Kunze wrote:
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?

Right now they are private constants in ceval.c.

I will (maybe) expose a private API via the _testcapi module to re-define them (set them to 1 or 0), only to write better unittests. I have no plans to make those constants public or have a public API to tackle them. IMHO, this is something that almost nobody will ever use.

Yury
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to