- While Java virtual machines are stack-based, the Dalvik virtual machine is register-based.
- Stack-based instructions are compact. The instructions used by the Java virtual machine take up only one byte and are therefore called bytecode.
- Register-based instructions take up more instruction space because they need to specify source and destination addresses.
- Some instructions of the Dalvik virtual machine require two bytes.
- Stack-based and register-based instruction sets have their advantages and disadvantages. Generally speaking, to perform the same function, the stack-based instruction needs more instructions (mainly load and store instructions), while the register-based instruction needs more instruction space.
- More instructions for stacks means more CPU time, and more instruction space for registers means more data buffers are more likely to fail.