This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Just a rough estimate on my part
Posted by Bill Venners on 19 Jun 1998, 6:19 PM
> The article claims JIT-tun programs are 3 to 10 times slower
> than native C. On the strenghth of this I converted my
> Java program to C. Result: 20% faster only (not worth
> losing Java benefits for).
> So, where is the evidence that Java is 3 to 10 times slower
> with a JIT?
I believe I got those particular numbers from a Sun person who
was giving a talk either at JavaOne or at a pre-JavaOne talk
that I was invited to. I'd have to look back at my notes to
Numbers that compare the performance of one type of VM over
another are inherently imprecise, because you have to gloss over
so many details. You can be accurate if you say a particular
benchmark ran X amount faster on a particular on VM1 as
compared to a particular natively compiled C program on a
particular system configuration, and so on. Such a comparison
gives accurate information, but only looks at one small slice
of the whole range of performance characteristics of the
particular VM and C compiler being compared, much less the
range of performance characteristics of all VMs like VM1 (say
all JIT compiling VMs) and all C compilers.
In other words, such numbers as 3 to 10 times are just rough
averages with some marketing spin stirred in. My agenda is to
try and be unbiased, so I chose numbers that I felt fit in
with various reports of JIT performance that I've heard from
various sources over the past 2 years. But it could be that
JITs have been quietly getting faster as a group and that this
fact has escaped my notice.
It is certainly possible for certain kinds of
natively-compiled C programs to run only 20% faster than
an "equivalent" Java program running on a particular JIT.
It sounds great. It makes me wonder, however, which JIT?
Which C compiler? What System? What kind of program. And
how was performance measured?
To summarize, the answer to your question is that as to
evidence, I am empty handed. I am just basically quoting
someone who I felt landed reasonably in the middle of the
various comparisons of JIT to native-C that I've heard.
It's a rough estimate.