[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fun-O Basic Edition Compiler
- To: address@hidden
- Subject: Re: Fun-O Basic Edition Compiler
- From: "Scott McKay" <address@hidden>
- Date: Fri, 4 Jan 2002 09:04:47 -0500 (EST)
- Organization: ATT Broadband
- References: <200112211641.LAA28762@life.ai.mit.edu> <3C276FAF.F89966B9@mediaone.net> <3C28F100.9478041B@mediaone.net> <J79W7.38357$5W5.14498010@typhoon.ne.mediaone.net> <3C2938A6.4242FE86@mediaone.net> <iQkW7.39099$5W5.14789627@typhoon.ne.mediaone.net>
- Xref: traf.lcs.mit.edu comp.lang.dylan:13865
"Scott McKay" <swm@mediaone.net> wrote in message
iQkW7.39099$5W5.14789627@typhoon.ne.mediaone.net">news:iQkW7.39099$5W5.14789627@typhoon.ne.mediaone.net...
>
> "Carl Gay" <carlgay@mediaone.net> wrote in message
> news:3C2938A6.4242FE86@mediaone.net...
>
> >
> > define method tak (x :: <integer>, y :: <integer>, z :: <integer>)
> > if (y >= x)
> > z
> > else
> > tak(tak(x - 1, y, z),
> > tak(y - 1, z, x),
> > tak(z - 1, x, y))
> > end if
> > end;
> >
>
> Try adding '=> (r :: <integer>)' as the return result of 'tak'. I'll bet
> that your use of the implicit return type of <object> is defeating some
> of FD's optimizations.
>
>
Oh, and the timing loop should be for (i :: <integer> from 0 below 2000).
You should add a fixnum decl to the Lisp code, too.
Then you'll be comparing apples to apples in all the code, because the
Java code is fully typed as 'int'...