Closed
Description
No big ideas here. Just cleaning up the code around dispatching so it does less work and thus runs faster.
I don't expect to see much, if any, speed up on Linux, but Windows should gain parity (approximately) by allowing the compiler to combine the jumps.
- Move tracing logic out of fast dispatch path:
if (tracing_possible) {
goto tracing_dispatch;
}
fetch_and_decode();
#ifdef COMPUTED
goto *dispatch_table[opcode]
#else
goto dispatch_opcode
#endif
- Remove anything between the label and the switch:
dispatch_opcode:
switch(oparg) {
Which should allow the compiler to combine the goto and the computed jump.
We may need to generate cases for all undefined opcodes, so that the range check is guaranteed to be eliminated.
Metadata
Metadata
Assignees
Type
Projects
Status
Done