LispOS and C
Lars Thomas Hansen
lth@ccs.neu.edu
Thu, 08 May 97 20:12:26 -0400
[The context: compiling Scheme to C. Someone stop me if this is off-topic.]
From: "Harvey J. Stein" <abel@netvision.net.il>
>I don't follow you. Every system I mentioned compiles arbitrary
>scheme programs to C, which can then be compiled & can run under unix
>(and other systems). Being scheme, they all include garbage
>collectors. Why is this so different from CMUCL? What's the big deal
>that there's intermediate code in the compilation process which
>happens to be C as opposed to directly outputing x86 machine code?
>And some of them are mostly themselves implemented in scheme (rscheme
>and gambit, if I'm not mistaken).
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. You can
set things up so that you can make such assumptions when generating C,
too, but at a performance penalty.
The magnitude of the performance win of precise over conservative GC, if
any, depends on the nature of the computation and possibly also on which
GC researcher you talk to.
--lars