> 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4