| Give three reasons that one might use a virtual machine (and compiling to native code) instead of a compiler to compile directly to machine code. |
| Okay, but there are several parts to this question, and you haven't got to the hard part yet... Mark Guzdial |
| Give three good and frequent reasons that one might add a primitive to a VM. |
| Okay, but primitives aren't ALWAYS faster than image code! When is a primitive SLOWER? Mark Guzdial |
| What takes up the majority of time and effort in a VM (typically)? |
| "Boxing and unboxing"?... Mark Guzdial |
| Why are VMs so often stack-based architectures? Why not have registers? |
| Think about memory, and compiler optimization, and RISC vs. CISC... Mark Guzdial |