Specialize bytecode for pairs()/next() iterator. Speedup: 3.5x.
Parser predict pairs/next and emits specialized bytecode. Bytecode is descpecialized at runtime if the prediction was wrong. Store slot index in hidden control var to avoid key lookups.
This commit is contained in:
@@ -2477,6 +2477,8 @@ void lj_record_ins(jit_State *J)
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
case BC_ITERN:
|
||||
case BC_ISNEXT:
|
||||
case BC_CAT:
|
||||
case BC_UCLO:
|
||||
case BC_FNEW:
|
||||
|
||||
Reference in New Issue
Block a user