We know java adopts stack-based instruction set in case of enhencing its compatibility,but stack operation is much slower than register operation,so is it a important factor degrades the performance of java?I learned that java some times also uses registers to accelerate its excution speed,but I don't know how and when does java utilizes registers. Thank you!
The Java bytecode model has very little to do with the actual code being executed in a running application. HotSpot, as well as all other major JVMs, compiles the bytecode into native code using all applicable optimizations.
There is no performance impact of the bytecode's stack-based model on the performance of modern JVMs.