[cap-talk] Dan Bernstein's qmail security lessons paper
James A. Donald
jamesd at echeque.com
Mon Dec 17 16:05:46 EST 2007
Ivan Krstic' wrote:
> Certain Lisp implementations are quite fast at certain
> tasks. On the other hand, Java JIT compilers have been
> getting incredibly good at optimizing code, and can
> get uncomfortably close to C performance.
>
> Here's Java 6, HotSpot JVM in server mode, going up
> against gcc, getting within 10% of C speed for some
> tasks:
> <http://shootout.alioth.debian.org/gp4/benchmark.php?t
> est=all&lang=java&lang2=gcc>
Any language is likely to get within ten percent of any
other on *some* tasks. The Sieve of Eratosthenes used
to be a widely used benchmark, until a number of
compilers incorporated sieve detectors and upon
detecting the sieve, spat out a hand optimized assembly
language sieve.
The test you cite fails to measure the bad Java startup,
which makes java notoriously aggravating in client
programs, though it does not affect server programs
much.
The Java programs usually took up twenty to thirty times
as much memory as C++. In practice, if you are running
C programs, most of your memory is in use, and if you
are running java programs, most of your memory is in
use, which means that when you are running java ...
The extremely poor performance of java programs I
experience is probably due to memory exhaustion on a two
gigabyte machine, plus of course Java's notoriously poor
start up time.
> Here's the same JVM doing better than Steel Bank
> Common Lisp on almost every test:
> <http://shootout.alioth.debian.org/gp4/benchmark.php?t
> est=all&lang=sbcl&lang2=java>
My comparison of Java and Lisp seems to have been
rendered out of date by the recent improvements in
memory management. I have no recent experience
comparing them. I have recent experience comparing
Java and C++, and these benchmarks are consistent with
my subjective experience: that Java really sucks. But
it does seem, that these days, it sucks less than it
used to and now slightly less than lisp, contrary to
what I claimed.
More information about the cap-talk
mailing list