Abstract
The relative performance of molecular dynamics (MD) computer simulations of fluids written in ANSI C is compared to that achieved by a comparable program written in Java. The performance of the Java program is shown to be dependent upon its runtime environment. The Java Runtime Environment (JRE) from the Java Development Kit (JDK) 1.2 provides a Just-In-Time (JIT) compiler option on Solaris and Windows 95 platforms which decreases the execution time by approximately 4–10× compared to the standard Java interpreter. The compiled Java implementation of the MD computer simulation runs between 30–100% slower. depending on the platform, compared to the equivalent C implementation. The stability of the two simulations, as measured by conservation of energy is shown to be identical to within ∼ 1% over 105 time steps.
Key Words: