[Prev][Next][Index][Thread]

Re: [Q] Dylan to Java/JVM compiler?



Bruce Hoult <bruce@hoult.org> writes:

> In article <m3d79poxgu.fsf@localhost.localdomain>, Lieven Marchand 
> <mal@wyrd.be> wrote:
> 
> > Is there at this moment a Dylan compiler that beats a good CL compiler
> > on equivalent code?
> 
> I don't know -- are there any non-trivial programs available for both?
> 

I assume the Gabriel benchmarks have been ported. 

> I would be surprised if Fun-O wasn't at least as good as any Windows CL 
> compiler.  Gwydion is a bit more patchy -- on fairly static code it can 
> do as well as C for many things, but our GF dispatch code isn't 
> currently all that fast.  Mind you, it may well match things like CMUCL.

You might get a good run for your money by CMUCL. CMUCL does a great
job in type inference. It also has a non standard extension
(block-compile) that lets you declare that functions won't be
redefined or called from without the block, which gives you some of
the benefits of sealing. Only CMUCL's PCL based CLOS implementation
isn't very fast.

> > Theoretically, the Dylan compiler can potentially
> > do better by the sealing constructs, but that's about the only
> > difference I see between CL and Dylan w.r.t. possible optimisation.
> 
> I agree, if CL lets you declare integers to not be arbitrary precision.  

(declare (type fixnum x))
or even
(declare (type (integer 1 10) y))

> Oh, and I don't think CL has a good alternative for Dylan's "limited 
> collections" either.

(make-array '(10 10) :element-type '(unsigned-byte 2))

(declare (type (vector 'simple-float 128) v))

With some tricks you can even do it for lists, where it won't buy you
much.

-- 
Lieven Marchand <mal@wyrd.be>
Glaðr ok reifr skyli gumna hverr, unz sinn bíðr bana.



References: