This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: Bugs and Optimizations
- To: lefevre at acm dot org, kawa at sourceware dot cygnus dot com
- Subject: Re: Bugs and Optimizations
- From: Mark DePristo <m-depristo at nwu dot edu>
- Date: Thu, 25 May 2000 11:54:18 -0500 (CDT)
- CC: Pinku Surana <surana at cs dot nwu dot edu>
- References: <20000525074019.15231.qmail@web512.mail.yahoo.com>
Olivier Lefevre writes:
> > I am working on a new Scheme -> JVM compiler
>
> What for to do? What's wrong with Kawa?
>
>
> Regards,
>
> -- O.L.
>
>
We are developing a new Scheme compiler for several reasons:
1) A company (unfortunately, I cannot disclose which company) is
paying us to develop a new compiler targeting a new VM similar to the
JVM.
2) We wanted to experiment with a flexible compiler written completely
in Scheme. The compiler includes a front end compiler and a
strongly-typed intermediate language called SINTL (my honors thesis is
about SINTL).
3) Lots of backend targets. Our compiler currently backends to the
JVM, C, and the other VM, with backends to C-- and MLRisc in
planning. In order to support so many backends, our runtime system is
written completely in Scheme, using fewer than 30 primitives on the
target machine to implement the R4RS Scheme RTS.
Right now, the JVM and C backends are the most stable and support R4RS
Scheme minus continuations. The C backend is a little bit (2x) slower
than Bigloo. The JVM backend is 10x faster than Kawa 1.6.1 and 25-30%
faster than Kawa 1.6.66.
The JVM backend includes less than a 1000 lines of Java code, and
roughly 2000 lines of Scheme code for the JVM instruction selector and
code generator.
The compiler will be released soon into the public domain. As soon as
everything is in shape and ready for public use, I'll post a URL to
a website describing our compiler. This website should have include a
copy of my honors thesis, which describes SINTL in great detail.
> OTOH, is your TScheme available and will you include it in your
> profiling study? I have an interest in Scheme implementations, too.
TScheme is available from
http://robot-lab.ils.nwu.edu/software/index.htm
TScheme is not a real Scheme compiler; it is a little language similar
to Scheme that compiles easily to C/C++ code. It's mainly useful as
an intermediate language between a real compiler and C. The only use
I know of TScheme right now is in our Scheme48 stubs generator.
I have benchmarking results (for the Gabriel Scheme benchmark suite)
of our C and JVM backends vs.:
1) Scheme48
2) MzScheme
3) MZc
4) Kawa 1.6.1
5) Kawa 1.6.66
6) Bigloo 2.1
I'll happily post this information in a couple of weeks, as soon as
everything is stable. It would be really helpful if I could get the
DERIV benchmark running on Kawa 1.6.66, before I post the
information/submit for publication.
BTW: How do you guys do tailcalls on the JVM? We are using a
trampolining mechanism that appears faster than whatever you are
doing. Our method, however, requires that the entire system be
compiled with full tailcall support. How does Kawa handle tailcalls?
Mark
--
"You better run all day
and run all night
And keep your dirty feelings deep inside
And if you take your girlfriend out tonight
You better park the car well out of sight
'Cos if they catch you in the backseat
trying to pick her locks
They're gonna send you back to mother
in a cardboard box
You better run" -- Run like Hell (Pink Floyd)
--------------------------------------
Mark DePristo, AMRG Group
Northwestern University
m-depristo@nwu.edu
http://www.cs.nwu.edu/~mdepristo/
--------------------------------------