From: Peter Ludemann
Subject: Re: Parenthesized syntax challenge
Date: 
Message-ID: <LUDEMANN.95Oct11221401@expernet5.expernet.com>
In article <··········@undergrad.math.uwaterloo.ca> ········@undergrad.math.uwaterloo.ca (Carl Laurence Gonsalves) writes:
   The incredible slowness of Java is only evidence of the inefficiency of
   garbage collection. I've programmed in a few languages that have garbage
   collection (among them are Scheme, Modula-3, and now Java), and all have
   been *much* slower than C or C++. I'm not saying Java is bad. Just don't

Complete and utter nonsense.  Of course, when repeated by certain AT&T
people, it seems to have some truth ...

A few years ago, some researchers at another "well-known" research lab
implemented a language that was much like C++, but included garbage
collection (with some reasonable restrictions on pointer usage).  The
implementation was essentially the same as C++'s (ie, a front-end
preprocessor to C).  The researchers took a number of existing C++
programs and recoded them in their language.  Some ran faster, some
ran slower; all ran within about 20% of each other and the average
performance for the two languages was about even.

The simple fact is that unless you're willing to put in a lot of
effort, explicit new/free doesn't do significantly better than a good
garbage collector.  (Some years ago, when I was working on such
things, the consensus in the literature seemed to be that garbage
collection cost between 5% and 15%; and the actual numbers would be
lower if the cost of explicit alloc/free were factored in for the
comparison ... and garbage collection technology has improved since
then).

Interpreted languages are usually slower than compiled languages
(although not always, especially if real memory is scarce, or if the
interpreted language is quite high level).  A good interpreter can
often get within a factor of 2 of a compiler.

Anyway, I know a couple of people who recently joined the Java team;
they are very experienced in building interepreters and garbage
collectors; and I'm sure that they will wring performance out of
Java's implementation.

--
Peter Ludemann			········@expernet.com
ExperNet			phone: +1.415.949.8691
Systems Architect		fax:   +1.415.949.1395
KNS Project Leader