Description
Currently (even during vanilla block execution) there are a couple of branches that are almost impossible for the processor to predict.
- Main loop potentially makes 3 function calls thru function pointers
https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L273
https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L286
https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L314
- also potentially branches internally on 2 conditionals
https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L267
https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L272
We could first try to minimize the number of branches by combining memory resize/dynamic gas handling and actual opcode execution in a single handler and then potentially also implement some flavor of direct threading to get rid of the main interpreter loop entirely.