Why Java performance is not even close to C/C++
There has always been a vocal crowd saying that Java and C/C++ performance is equivalent or at least close. Early on I sided with the C/C++ crowd saying that Java couldn't come close in performance. Lately I have been on the Java side of the fence. Java has come a long way in improving performance.
But I just had an ephiphany. The performance almost everyone measures is single process performance. It doesn't take into account the memory footprints of teh JVMs (or if it does then there is a lot of handwaving of why memory doesn't matter.)
If you architect systems with Java servers (in the sense of client and server) you get the overhead of a JVM per server. In an architecture that demands more than a few servers this is a staggering blow to the memory capacity of a medium-sized machine. Yes, I know about the efforts to have the JVM's use shared memory, put the common classlibs in shared memory, and even have multiple java programs use the same JVM. These efforts aren't standardized and still have a long way to go.
One solution is to have a single (changeable) JVM hooked into the kernel that can then execute your Java code. This would make the JVM a first class kernel object. There would only be one instance of the JVM for all java servers. Other JVMs would run as today, but a mechanism could be used to have a program use the in-kernel JVM if it wanted.
For production multi-server systems it seems that you can count Java out if you want reasonable performance. At least until we get Java down to a single JVM for multiple servers.
