The scarcity of applicable empirical data on the issue of C++ versus Java performance led the authors to conduct their own series of performance studies. A performance comparison was made of Java and C++ in the implementation of a test system representative of those encountered in simulation systems. The algorithms chosen were deemed to be representative of both the algorithms used in simulation systems and those which consume the majority of the time-based computational load. They included a hull dynamics model, geometric intervisibility, and a scheduler / dispatcher. The exact same algorithms were implemented in both Java and C++.
As with some developmental programs, execution speed was not the only item of concern in this study. Often programmer productivity and error rates are major factors in choosing a particular programming language. To capture information about these factors, productivity rates of each of the programmers were recorded as they developed code from scratch and ported the code to the new language. Subjective evaluations from each of the programmers concerning their opinions on the ease of using the language for the given applications was also collected. This paper describes the programming language study and presents empirical and subjective findings that both program managers and developers should be aware of when making programming language selections for future simulation systems.
This is the second paper in a series of empirical studies the authors have conducted into the relative performance programming languages and their suitability to the Modeling and Simulation Domain.