Mon, 12 May 1997 19:21:10 +0200 (MET DST)
>>: HJ Stein
> Generating native code makes it possible for the RTS/GC to make
> assumptions about the kinds of values that can be found in specific
> registers and stack locations. This can be a win; for example, it
> allows you to use a precise rather than conservative collector.
It also allows you to build real-time code,
to efficiently implement locks, optimistic scheduling,
run-time code generation/specialization,
orthogonally persistent code, etc.
> You can set things up so that you can make such assumptions
> when generating C, too, but at a performance penalty.
And to be portable, you must restrict to pieces where the semantics
are well-defined, which looses even more performance.
If you're not going to be portable, then C has no interest.
[Stealing the GCC/whatever backend might (or not), however].
> The magnitude of the performance win of precise over conservative GC, if
> any, depends on the nature of the computation
In a C system, conservative GC is all you can get,
and it's enough, as the C program is designed to be safely rebooted
whenever it fills memory. Small memory leaks are OK.
In a persistent system, objects are to live forever;
the system must be able to stand days, weeks, months, years, decades,
without being logically restarted (note: in such a system,
physical reboot does NOT cause logical reboot,
but resumption of computations to last checkpoint).
Unless your conservative GC is really precise (in which case
you're gratuitously losing performance at making it conservative),
you'll have memory leaks that will kill your system
(at POPL'97, Peter Lee explained how FoxNet's WWW server
had to reboot every other week because of a stupid memory leak
in the thread implementation; was a precise GC).
> and possibly also on which GC researcher you talk to.
You're being unfair here.
Everyone agrees that if you can have compiler support,
precise GC is definitely the way to go.
Everyone also agrees that if you can't,
conservative is more than good enough.
== Fare' -- firstname.lastname@example.org -- Franc,ois-Rene' Rideau -- DDa(.ng-Vu~ Ba^n ==
Join the TUNES project for a computing system based on computing freedom !
TUNES is a Useful, Not Expedient System