[gclist] ref-counting performance cost

Richard A. O'Keefe ok@atlas.otago.ac.nz
Wed, 11 Oct 2000 16:55:23 +1300 (NZDT)

	Also, it is perceived by them that Java is the only environment
	(possibly .NET as well) which makes garbage collection worthy of study
	(because it is becoming so much more popular), and so I am also being
	swayed towards focusing on performance specifically in the context of
	a JVM.
This is a very odd perspective.  A limited, limiting, and flawed language
becomes popular, so therefore it defines what is worthy of study?  On that
criterion, one might do as well (or better) to study memory management in
the context of Perl.

I was in Sweden last week for the Erlang Users Conference.
Somewhat over a year ago, the inventors of Erlang formed their own
company, Bluetail, using Erlang to develop "Internet solutions".
They were recently bought by Alteon (having done a lovely piece of
work for Alteon) for something like USD 200 million.  Erlang/OTP is being
used by Intelligent Network Services providers.  It's providing *solutions*
for problems that C, C++, and Java are failing at (sometimes
spectacularly).  Existing Erlang systems are using a number of processes
that Java can only dream of (after eating a lot of bad cheese).  The
Erlang people have published at least one paper on their garbage collection
scheme, but there is surely more to be done.

Then there's a lot of work still to be done on heap profiling, to find out
where the space is coming from.  (See the work at York, in their Haskell
compiler, for example.)  Could a new RC-like method help with that?

The job of a PhD is to produce *knowledge*.  You're not supposed to be
following today's fashions slavishly, you're supposed to be setting the
fashion for the day after tomorrow.  And if that involves learning and
translating lessons from the past, that's wonderful.  Let's suppose you
did come up with a great new GC method for Java (and the full Java sources
are or were available for academic research, so you could work with "the
real thing").  There's still no reason to expect that anyone would ever
adopt it.

For what it's worth, Inferno (which is, or was, freely available) is the
same kind of language as Java, more or less (except for supporting ADTs
rather than classes with inheritance), and uses reference counting, using
two different kinds of pointers at compile time so that you can have
graphs with pointer cycles that are not graphs with reference cycles.