The capability of platform independence promised by the Java programming language coupled with the rapid expansion of the Internet made Java immediately attractive to developers. Java's programmer-friendly design as well as its safety and flexibility have fostered sustained interest in the language. There is, however, a kind of “apology” made for Java due to its slow execution relative to other object-oriented languages, particularly to C++. Yet, Java performance is steadily improving through the use of JIT (Just In Time) compilation and other runtime enhancements. This research reviews the results of execution comparisons between Java and C++ presented in the current literature. It further describes the design of a software benchmark suite that analyzes and compares generic programming libraries available to both languages. The results indicate a much narrower performance gap than expected between the Java and C++ generic libraries. It appears that the Java performance penalty is becoming much more “acceptable,” thus allowing developers, especially those interested in generic programming, to use Java without apology.
展开▼