Anne Thomas Manes wrote:
There's no reason for massive speed differences between C++ and Java aside from developers not knowing what they're doing. Well designed Java code should be no more than a maximum of about 30-40% slower than equally well designed C++ code (after loading and initial JVM optimization). If you're getting worse results than that it's due to your developers, not to the language/platform.There's no doubt that a C++ environment will offer higher performance than a Java environment. Ask Systinet. WASP for C++ is a *lot* faster than WASP for Java. The two environments use basically the same architecture, but C is just faster than Java. Even so I suspect that it would be easier to make WASP for Java support massive scalability than WASP for C++. All you have to do is deploy it in WebLogic. There isn't an app server comparable to WebLogic for the C++ world. (well -- there's Tuxedo -- but I don't know of anyone who's developed a SOAP platform for Tuxedo yet). But since C++ is so much faster than Java, the threshold at which you need a really high-end app server is quite a bit higher.
I've personally replaced C++ subsystems with Java subsystems that did more work and did it several times faster, while being more maintainable than the C++ code had been. I've also improved the performance of one enterprise Java system by a factor of more than 100 in a few weeks work (most of which was spent convincing the technical management of my reasons, through a detailed timing analysis).
There does seem to be a tendency for Java developers to write horrible inefficient code. This may be a side effect of Java features - with garbage collection behind the scenes, and threads so easy to create, it's very easy to ignore the performance implications of what you're doing. Don't blame the platform, though.
- Dennis
Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support
http://www.sosnoski.com
Redmond, WA 425.885.7197