This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients BTaskaya, Guido.van.Rossum, Mark.Shannon, barry, corona10, gvanrossum, methane, nascheme, pablogsal, yselivanov
Date 2021-01-06.01:09:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1609895342.32.0.869287813493.issue42115@roundup.psfhosted.org>
In-reply-to
Content
I've skimmed several papers by Stefan Brunthaler about something called Quickening that I first found via the Pyston blog, which linked to an ancient bpo issue with a patch created by Stefan (https://bugs.python.org/issue14757).

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).

I think the idea is that it's pretty cheap to keep an extra pointer to a "alternate bytecode" array.
History
Date User Action Args
2021-01-06 01:09:02gvanrossumsetrecipients: + gvanrossum, barry, nascheme, methane, Mark.Shannon, yselivanov, Guido.van.Rossum, corona10, pablogsal, BTaskaya
2021-01-06 01:09:02gvanrossumsetmessageid: <1609895342.32.0.869287813493.issue42115@roundup.psfhosted.org>
2021-01-06 01:09:02gvanrossumlinkissue42115 messages
2021-01-06 01:09:02gvanrossumcreate