基于栈式架构得虚拟机所使用的零地址指令更加紧凑,但完成一项操作的时候必然使用更多的入栈和出栈指令,这同时也就意味着将需要更多的指令分派次数和内存读写次数
由于操作数是存储在内存重的,因此频繁地执行内存读/写操作必然影响速度。
综上所述:
JVM:将栈顶元素全部缓存在物理CPU地寄存器当中,从此降低对内存地读/写次数,提升执行引擎地执行效率