[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

Yury Selivanov report at bugs.python.org
Tue Jan 5 22:42:49 EST 2021


Yury Selivanov <yselivanov at gmail.com> added the comment:

> The gist seems to be to have extra opcodes that only work for certain situations (e.g. INT_BINARY_ADD). In a hot function we can rewrite opcodes with their specialized counterpart. The new opcode contains a guard that rewrites itself back if the guard fails (and then it stays unoptimized).

This is also roughly what I suggested in https://bugs.python.org/msg379333. Except that I don't think it's necessary to add new opcodes.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42115>
_______________________________________


More information about the Python-bugs-list mailing list