There appears to be a number of peephole optimizations we could add that may not add up to a lot of improvement, but could be useful under some circumstances. For example, a few I know of (Marcin may know more):
- Bare literals on a line are not executed
- Repeated retrievals of the same local variable with no intervening code are reduced to a single retrieval or not executed at all
- Repeated retrievals of an instance variable with no intervening code are reduced to a single retrieval
All of these tend to confound benchmarking, but they may also be easy for us to add to reduce (slightly) overhead in cases of badly-written code.