There does not exist an absolute benchmark for software performance.
There are far too many variations in software languages, in their
strengths and weaknesses, in the platforms they run on, in they
way programs are written, etc.
Comparing C to Java can be difficult. For example, an algorithm
implemented in C might vary considerably in speed according to how
optimized the code is. Similarly, implementations of the algorithm
in Java can vary greatly. So obviously this will all lead to a wide
divergence in results when comparing C to Java implementations of
that algorithm. Ideally, you would compare only the most highly
optimized implementations of the algorithm in both languages but
that can be difficult to arrange.
For Java there are also the challenges of comparing the same code
run in different JVMs and on different platforms. A Just-in-Time
compiler will need to convert the bytecode to local machine code
during the first pass through a section of the program. Unless this
section of code is run repetitively, there may not be much of a
speed up. Similarly, a JVM like the Sun Hotspot needs a period of
time to see what sections of code need to be optimized. This will
again lead to poor initial performance but increasingly fast speeds
as the program continues to run.
Nevertheless, benchmark comparisons can still give a general idea
of how a language, JVM, etc. performs. Many efforts have been made,
and continue to be made, to develop useful benchmarks for evaluating
Java performance. The following links porint to a number of benchmark
discussions and specifications:
pulling ahead? Java versus C++ benchmarks,
J.P.Lewis and Ulrich Neumann , University of Southern California
3 - Measurement Is Everything in JavaTM
Platform Performance: Strategies and Tactics - Steve Wilson, Jeff
Kesselman - 2001
Java fast: Optimize!
by David Thomas about Benchmarks
Archive: Java, Solaris, CaffeineMarks, and all that
- Java accelerator vendors mull improved benchmark
Developer's Journal - J2ME Benchmarking: A Review
Java fast: Optimize!
Mac Observer: JVM Showdown
your own benchmarks for Java execution time - EE Times - Apr.1.02
- EEMBC - Embedded
Microprocessor Benchmarking Consortium
- Pendragon Software
- Palm OS Database Software Home Page
Volano Report: Which Java platform is fastest, most scalable?
A JavaWorld exclusive!
SPEC JVM98 Results
SciMark 2.0 (About)
Benchmark -- Java Version
- The Plasma
1.0f - practicalembeddedjava.com/
1.1a - practicalembeddedjava.com/
Benchmarking C++, C#, and Java: Elementary tests for comparing
By Thomas Bruckschlegel, C/C++ Users Journal July, 2005.
See also the discussion
in Chapter 24 on comparing hardware implementations of Java
Most recent update: Mar.20, 2006