[MLton-user] more optimization questions

Stephen Weeks MLton-user@mlton.org
Sun, 20 Nov 2005 20:36:12 -0800


> The metric which is driving my interest in this is not what C does,  
> it' what do I get for MFLOPS.  However, C gives better MFLOPS so I  
> use it as a benchmark.  I think this is an interesting problem in  
> that it's very easy to understand how to write these FD-like codes  
> very efficiently - so what keeps a higher order language from doing  
> the same ?

Nothing.  Until we see your code we can't be sure, but I think that
the factor of 3.5 could be completely attributable to a combination of
overflow detection, bounds checks, lack of loop optimizations, and
translation to C instead of native code.

My point being that the differences are not fundamental to
higher-order languages or to SML.  More, relatively straightforward,
work on MLton and judicious use of flags/primitives that avoid checks
should be able to eliminate the difference.  I'm still optimistic
that, once we see the code, we can get a good bit of the way there.