[MLton-user] timing anomoly

Sean McLaughlin seanmcl at gmail.com
Tue Dec 4 11:36:25 PST 2007


Oh, I'm sorry!  Thanks for this.  It was keeping me up at night.

Sean

On Dec 4, 2007 2:12 PM, Vesa Karvonen <vesa.a.j.k at gmail.com> wrote:
> On Dec 4, 2007 6:48 PM, Sean McLaughlin <seanmcl at gmail.com> wrote:
> > Fair enough :)
> >
> > However, is it possible to make this code run faster?  It currently runs
> > over 3X slower than the equivalent C program:
> [...]
>
> I compiled the code snippets with both MLton and gcc (-O2) and
> inspected the generated assembly code.  What is happening here is that
> gcc eliminates most of the floating point computation.  Note that all
> of your "x" variables are constants.  You should read the "x" values
> from some run-time input for a more meaningful benchmark.
>
> -Vesa Karvonen
>



More information about the MLton-user mailing list