A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-February/143087.html below:

[Python-Dev] Opcode cache in ceval loop

[Python-Dev] Opcode cache in ceval loop [Python-Dev] Opcode cache in ceval loopSven R. Kunze srkunze at mail.de
Wed Feb 3 16:37:33 EST 2016
On 03.02.2016 22:22, Yury Selivanov wrote:
> One way of tackling this is to give each optimized opcode
> a counter for hit/misses.  When we have a "hit" we increment
> that counter, when it's a miss, we decrement it.

Within a given range, I suppose. Like:

c = min(c+1, 100)

>
> I kind of have something like that right now:
> https://github.com/1st1/cpython/blob/opcache5/Python/ceval.c#L3035
>
> But I only decrement that counter -- the idea is that LOAD_ATTR
> is allowed to "miss" only 20 times before getting deoptimized.
>
> I'll experiment with inc/dec on hit/miss and see how that affects
> the performance.
>
> An ideal way would be to calculate a hit/miss ratio over time
> for each cached opcode, but that would be an expensive
> calculation.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4