Hi all, I am developing a specialized Compiler that outputs optimized Java classes. One way of reducing the size of the bytecodes is to reduce the data transfers between local variables ( 3 and up) and the operand stack. ie. keep the temporary or intermediate data on the stack and not transfer it to local variables. This definitely reduces the size of class files. So I was expecting an improved performance. Instead of performance improvement, I observed that the performance actually degrades.
I could not find any documentation which explains this behavior of JVM.
I have read the JVM spec, but could not find the reason there.
Can anybody give me explaination to why this happens ?