Dynamic superinstructions and replication can provide large speedups
over plain interpretation. In a JVM implementation we have to overcome
two problems to realize the full potential of these optimizations: the
conflict between superinstructions and the quickening optimization;
and the non-relocatability of JVM instructions that can throw
exceptions. In this paper, we present solutions for these problems. We
also present empirical results: We see speedups of up to a factor of 4
on SpecJVM98 benchmarks from superinstructions with all these problems
solved. The contribution of making potentially throwing JVM
instructions relocatable is up to a factor of 2. A simple way of
dealing with quickening instructions is good enough, if
superinstructions are generated in JIT style. Replication has little
effect on performance.