Skip to content

Commit 193b808

Browse files
eendebakptclaude
andcommitted
pythongh-146306: Specialize float/float true division in tier 2 optimizer
Float/float true division is not specialized at tier 1, going through generic BINARY_OP dispatch. This adds tier 2 specialization that the optimizer emits when at least one operand is known to be a float: - _BINARY_OP_TRUEDIV_FLOAT (non-inplace) - _BINARY_OP_TRUEDIV_FLOAT_INPLACE (unique LHS) - _BINARY_OP_TRUEDIV_FLOAT_INPLACE_RIGHT (unique RHS) The optimizer inserts _GUARD_TOS_FLOAT / _GUARD_NOS_FLOAT for operands not yet proven to be float, enabling specialization in expressions like `(a + b) / c` where only the LHS type is known. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6009309 commit 193b808

7 files changed

Lines changed: 1641 additions & 1218 deletions

File tree

0 commit comments

Comments
 (0)