[Python-Dev] Bytecode idea

Raymond Hettinger python@rcn.com
Tue, 25 Feb 2003 23:11:48 -0500


> 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