You are missing something huge with these VM's. They do exactly what you say, but automatically. It's call a Just-In-Time Compiler and it is why .NET (On Windows) and Java isare extremely close to the speed of natively compiled C++ code.
The Java/C# Source code is converted into byte code. This byte code is then compiled into machine code on the machine it is currently running on. For the most part, the VM will run the native code instead of reprocessing the byte code.
I have skipped over quite a bit and oversimplified the process, but VM's do a substantial amount of work.