Friday, October 3, 2008

Java vs C in speed performance

Fiction :
Java is a hundred times slower than C, so you shouldn't ever use it for "serious" programming.

Fact :
The original Java Virtual Machines were slow, so slow that a comparable C application was about twenty times faster. The gap between C/C++ and Java is growing smaller though, thanks to better designed JVMs, and Just-In-Time (JIT) compilers that convert bytecode to native machine code at runtime.

Much of the cause for speed concerns is actually over applet loading - large applets take a long time to load initially. Thankfully, Java applications and servlets are not subject to such slow loading times.

No comments: