http://labs.oracle.com/techrep/2002/smli_tr-2002-114.pdf
It's from a while back now but still shows a rather important point and debunks a rather widespread myth at the same time... Well written Java is generally no slower than C. In fact, it's often faster because of how clever the JIT compiler is these days
Admittedly these were guys that know the innards of Java better than anyone, but bear in mind this was written almost a decade ago and both the compiler and hotspot VM are a heck of a lot cleverer these days.
How? Well, C code might be platform dependant and native, but it still needs to be written to run on a number of different architectures. The Java VM knows exactly what hardware it's on when it's running your code, and because of this it can do things entirely differently depending on the underlying processor, memory available, the lot. So it can be incredibly specific in its optimisations, and especially using the server VM (which takes a while to start up but is stupidly fast when it does) it does an amazing job at it.
So if you ever hear the rumour / myth flying around that Java is as slow as slugs on depressants, ignore it. The last time it held much truth was in the 90's. When used properly Java is a blisteringly fast language, and continuous improvements mean it's only set to get better!
It's from a while back now but still shows a rather important point and debunks a rather widespread myth at the same time... Well written Java is generally no slower than C. In fact, it's often faster because of how clever the JIT compiler is these days
Admittedly these were guys that know the innards of Java better than anyone, but bear in mind this was written almost a decade ago and both the compiler and hotspot VM are a heck of a lot cleverer these days.
How? Well, C code might be platform dependant and native, but it still needs to be written to run on a number of different architectures. The Java VM knows exactly what hardware it's on when it's running your code, and because of this it can do things entirely differently depending on the underlying processor, memory available, the lot. So it can be incredibly specific in its optimisations, and especially using the server VM (which takes a while to start up but is stupidly fast when it does) it does an amazing job at it.
So if you ever hear the rumour / myth flying around that Java is as slow as slugs on depressants, ignore it. The last time it held much truth was in the 90's. When used properly Java is a blisteringly fast language, and continuous improvements mean it's only set to get better!