gh-131798: Optimize _ITER_CHECK_TUPLE (GH-134803)

This commit is contained in:
Noam Cohen 2025-05-27 21:30:17 +03:00 committed by GitHub
parent ac539e7e0d
commit 79d81f7cba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View file

@ -1615,6 +1615,12 @@
}
case _ITER_CHECK_TUPLE: {
JitOptSymbol *iter;
iter = stack_pointer[-2];
if (sym_matches_type(iter, &PyTuple_Type)) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
sym_set_type(iter, &PyTuple_Type);
break;
}