No subject
Stephen Weeks
MLton@sourcelight.com
Thu, 12 Oct 2000 19:53:15 -0700 (PDT)
> I had an exchange with Reppy where I sent him
> > I'm sure that MLton does much better at tupled (as opposed to curried) args.
I think "much" is an exaggeration. For recursive functions it does better. For
nonrecursive ones it will almost always do exactly the same, unless the closures
are huge and the inliner doesn't kick in for the curried case.
> > This is caused by the fact that that is the way we like to write things, but
> > Stephen and I have talked about ways to fix this so that it does well on
> > a broader set of styles.
> and he responded with
> > But this is a place where OCAML has a linguistic example. Since evaluation
> > is right to left for function arguments in OCAML, the compiler can generate
> > specialized entries for partial applications.
>
> I'm confused. The word `example' clearly makes no sense.
I believe he means advantage.
> He seems to be
> referring to the fact that OCaml allows arbitrary order of evaluation for
> f arg1 ... argn
> (I couldn't find any place that requires it to be right-to-left). Even so,
> how does that help to generate specialized entries for partial applications?
I don't know. And it clearly doesn't matter for the benchmark in question
since simple uncurrying will remove it, whether done by hand or compiler.