[MLton-user] more optimization questions
brian denheyer
briand@aracnet.com
Wed, 21 Dec 2005 21:41:58 -0800
> I don't think that's necessary for the approach I described, which has
> both the advantage of not needing to modify input SML program as well
> as a performance advantage. To be more clear, here's what I did. I
> started with a vanilla install of MLton 20051202. I then did two
> things.
>
> * Eliminated the definition of abs from line 91 of
> lib/mlton/sml/basis/real/real.fun
> * Added a line to lib/mlton/include/c-chunk.h
> #define Real64_abs fabs
>
>
Thanks for the info. I definitely would not have figured that out.
Especially since what I did worked.
> Perhaps this difference may explain why I saw a better speedup than
> you.
OK - I made the change and now I see 3.9s and 4.9s, now only 25%
difference. Quite good !
> speed and C-style correctness :-) if they want. But they can do it
> selectively and lazily, only after profiling shows it would help a
> particular hot loop in their programs.
That sounds very useful.
Thanks again.
Brian