You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in support of #118093, where we want to merge BINARY_SUBSCR into BINARY_OP.
Prior to merging BINARY_SUBSCR into BINARY_OP, we want to get rid of the BINARY_SLICE opcodes as they complicate specialization. Without BINARY_SLICE we want to treat constant slices as constants, to reduce the overhead of computing slices.
With this change the bytecode for seq[:-1] goes from:
markshannon
changed the title
Treat constant slices as slices and remove BINARY_SLICE opcodes
Treat slices with constant parts as constants and remove BINARY_SLICE opcodes
May 24, 2024
Benchmarking suggests that it is worth keeping BINARY_SLICE. If we implement tagged ints, the performance benefit of BINARY_SLICE is likely to increase.
This is in support of #118093, where we want to merge
BINARY_SUBSCR
intoBINARY_OP
.Prior to merging
BINARY_SUBSCR
intoBINARY_OP
, we want to get rid of theBINARY_SLICE
opcodes as they complicate specialization. WithoutBINARY_SLICE
we want to treat constant slices as constants, to reduce the overhead of computing slices.With this change the bytecode for
seq[:-1]
goes from:to:
Linked PRs
The text was updated successfully, but these errors were encountered: