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

Re: Fun-O Basic Edition Compiler



"Scott McKay" <swm@mediaone.net> writes:

> "Carl Gay" <carlgay@mediaone.net> wrote in message
> 3C29DECF.8C2234C7@mediaone.net">news:3C29DECF.8C2234C7@mediaone.net...
> 
> >
> > New numbers after adding a return type decl to the Dylan
> > code:
> >
> > FunDev   Lispworks   Java
> > 8.343s   6.8s        4.297s
> > 1.0      1.2x        1.9x
> 
> OK, I suspected as much.  I tried it, too, and got the same nearly
> 2x improvement you see.
> 
> Now I'll bet that the 2x difference is because FD has to untag/tag the
> integers on function entry/return.  Does FD have a disassembler we
> can use to verify this?

the problem is not the untag/tag on function entry/return i suspect,
but that the integers must be untagged/tagged to add because we use a
nonzero low-order tag.  you see, in lispworks and other "more mature"
implementations, they use zeros in the low-order few bits and can add
without untagging/tagging.

now it turns out though that with more real world examples where
function bodies are bigger, dylan does all but the first and last
untag/tags respectively, performing raw arithmetic within a body
instead.  thus, this tagging cost is amortized across the body of a
function.  we had hoped to implement "raw entry points" but never got
around to it.

jonathan bachrach


References: