[MLton] leaf inlining

Ville Laurikari ville at laurikari.net
Mon Jun 25 03:04:40 PDT 2007


On Sun, Jun 24, 2007 at 10:46:51PM -0500, Matthew Fluet wrote:
> There's a lot of data there, but it seems that a little more inlining
> would be profitable.

This would be my experience as well.  I had a program which, according
to profiling results, was using maybe 5-15% percent of the time
(cannot remeber exactly) in a number of functions which do not do
anything.

The code in question was a generic algorithm implemented as a functor
over some functions.  In one instance I was passing the functor a
structure where the functions were mostly no-op.  To my surprise, the
calls to these functions were not completely eliminated (according to
at least profiling results).  The functions were called hundreds of
millions of times, amounting to a small slowdown.  With "-inline
100000" they went away and the program speeded up a bit.

--
http://www.iki.fi/vl/



More information about the MLton mailing list