[MLton] Question on profile.fun

Stephen Weeks MLton@mlton.org
Sat, 4 Jun 2005 11:35:39 -0700


>         #       MLton1/MLton0 <=
>         --      ----------------
>          7      1.0
>         28      1.1
>         36      1.2
>         37      1.3
>         40      1.4
>         40      1.5
...
> So, this seems to suggest that the slowdown due to missed SSA 
> optimizations is fairly low, though it is the cause of the insane behavior 
> of wc-scanStream.

Yeah.  I would hope that with some hard work, all these numbers could
be significantly improved.  This would help all forms of profiling,
and would make the case for the signal-based time profiling even
stronger, since the code-insertion would have a proportionately
greater effect.

>         #       MLton3/MLton1 <=
>         --      ----------------
>         15      1.0
>         40      1.1
>         42      1.2
> 
> So, the labels have virtually no effect on codegen optimizations.

Pretty compelling.  We should keep in mind to check this whenever
someone rewrites the codegen to make it more heavily optimizing :-).

>         #       MLton1/MLton0 <=

This should be    MLton2/MLton0 <=

>         --      ----------------
>         2       1.0
>         15      1.1
>         25      1.2
>         27      1.3
>         31      1.4
>         33      1.5
...
> So, I'm convinced that the code insertion technique is too intrusive for 
> time profiling.

It does look that way.  But certainly not as bad as I would have
guessed.  Thanks for all the experiments.  It's amazing how much can
be done quickly with a nice infrastructure and a few tweaks.