bpo-46841: Use *inline* caching for `BINARY_OP` by brandtbucher · Pull Request #31543 · python/cpython
Here's a sort-of-rough first pass at implementing this idea. BINARY_OP is easy to start with, since it only uses its cache for the adaptive counter member. Initial perf testing doesn't show any impact, which I think is good (it means that the basic idea works well, even when the cache isn't being used).
Related changes:
- All of the
disutilities grow ashow_cachesparameter, defaulting toFalse. wordcode_helpers.hhas been moved intocompile.c.