On 12/3/2011 11:28 AM, Jonathan M Davis wrote:
I think that what it comes down to is that Java used to be a lot slower than it is now but is now plenty fast for a lot of stuff, and that original reputation for slowness has stuck on some level. In some cases, Java will be as fast as C. In many cases it will not. But it really isn't particularly slow for a lot of what it's used for. So, it really does have an unfair rap at this point for being slow. It really isn't. However, it will never match C for speed such that anyone looking to get every ounce of speed from their CPU is going to find it acceptable.
Java is as fast as C (excluding the slow Java startup time) when the C code is written as Java code (i.e. using types equivalent to Java types, pointers to structs, everything on the heap, etc.).
It's when you take advantage of things C has to offer, like user defined value types, pointers, etc., that C pulls way ahead.