[New-bugs-announce] [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP

Brandt Bucher report at bugs.python.org
Wed Oct 27 18:13:52 EDT 2021


New submission from Brandt Bucher <brandtbucher at gmail.com>:

...as discussed in https://github.com/faster-cpython/ideas/issues/101.

This change merges all BINARY_*/INPLACE_* instructions, except for a few special cases:

- BINARY_ADD/INPLACE_ADD, which interact with sq_concat/sq_inplace_concat and already have their own specialization family.
- BINARY_MULTIPLY/INPLACE_MULTIPLY, which interact with sq_repeat/sq_inplace_repeat and already have their own specialization family.
- BINARY_POWER/INPLACE_POWER, which are technically ternary operators under-the-hood.
- BINARY_MODULO/INPLACE_MODULO, which contain a special fast path for string formatting (but likely can be rolled in later as a specialization).

It has no mean impact on pyperformance, shrinks the eval loop, and makes it much simpler to implement operator specializations.

----------
assignee: brandtbucher
components: Interpreter Core
messages: 405136
nosy: Mark.Shannon, brandtbucher, gvanrossum
priority: normal
severity: normal
status: open
title: Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP
type: performance
versions: Python 3.11

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


More information about the New-bugs-announce mailing list