[MLton] Question on profile.fun

Stephen Weeks MLton@mlton.org
Wed, 1 Jun 2005 11:47:50 -0700


> Well, I added the -profile mark option which essentially adds the time
> profiling labels, but doesn't install the sig handler (or produce a
> mlmon.out file).  I ran that through the benchmarks, and I believe that
> it's still 20-30% overhead.  So, I think the overhead is more from failing
> to optimize in the presence of profiling statements than from gathering
> the profile data itself.

That makes sense, since the signal handler really should cost nothing,
and the signal handler is the only run-time activity with our current
approach to -profile time.