Research WebPage; Clean 2

rinus plasmeijer rinus@cs.kun.nl
Wed, 01 Dec 1999 21:32:37 +0100


Hi Antonio,

Antonio Eduardo Costa Pereira wrote:

> On 30 Nov 99, at 1:13, rinus plasmeijer wrote:
>
> > > On some other side, I am a Clean programmer and I am impacient to learn
> > > about as many and as deep details as possible about the new Clean 2.  Can
> > > you provide me with some information about this?
> >
> > We still are working on the Clean 2.0 compiler.
> I am curious about an aspect of Clean 2.0. In a Haskell thread,
> someone told that I seem to like small, fast, stinggy compilers.
> The observation was derisory. However,  I must concede that I do
> like small, fast, stinggy compilers. To tell you the truth, I like
> small, fast, stingy programs in general. My favorite browser is
> opera (1.2 Mb), my text editor is CryptEdit (600 K, installed), and
> my compiler is Clean 1.3.2.
>
> Is Clean 2.0 small, fast, and stingy, like Clean 1.3.2?
> Someone whose name I cannot remember said that Clean is so
> good because it is written in C. Since Clean 2.0 is written in Clean,
> it will be like the other funcional languages: large (20 M+), slow
> (one hour to compile the libraries), heap hungry, large executables
> (2 Mb for Hello world),  poor handling of matrices, slow io, hard to
> install, etc. Is it true? To make a long storty short:
>
> 1- How big is the Clean 2.0 compiler?
> 2- Is it slow? How long does it take to compile the StdEnv?
> 3- How big is the code for a program to solve a linear system of
> equations using Thorsten's library?
> 4- How the generated code compares with Clean1.3.2' s? Is it
> much slower?
>
> I am not in a hurry to get Clean 2.0, since Clean 1.3.2 works
> so well. Therefore, I think that you should take your time to
> make Clean 2.0 at least approach Clean 1.3.2 in efficiency.
> In the mean time, you could satisfy our curiosity, informing
> us about the general performance of Clean 2.0.

Clearly, the 2.0 compiler will be slower (currently maybe 3 times) and bigger (currently it is 2
Mb).
There is still room for efficiency improvements, but first we want the compiler to work.
It will however never become as fast as the C version, but it will certainly not be as terrible as
you mentioned above.
A compiler who needs an hour  is unusable.
By the way, not everything is rewritten in Clean. The code generator, the part of the compiler which
translates core Clean to ABC code, is shared between both compilers and written in C.
Not all transformations which are available in the 1.3 compiler will be put in the first release of
the 2.0 compiler.
But, since it much easier to add stuf to the new compiler we hope that in the end te new compiler
will generate even better code.
Things we have in mind is specialized version for strict lists and the like.

Greetings,

Rinus