
Feb. 26, 2003
4:11 a.m.
Maybe it also makes sense to use indexing into a static array, instead of the case construct.
That makes sense to me. I would be stunned if adding an inner case statement helped (the cost of a second unpredicable branch would have to be less than the cost of cache line utilization of a bit of redundant code). My thought on the big case statement was to have it do more disaggregration. For instance, each op code already knows whether it needs an oparg, so there is no need for a separate test for it on every pass with HAS_ARG(opcode).
While I don't know if this really makes the interpreter more efficient
Time it and see. Raymond Hettinger