[MLton] MLton HOL

Stephen Weeks MLton@mlton.org
Fri, 28 May 2004 10:10:29 -0700

> I gave commonArg a quick look.  The analysis itself is very much like the
> contification analysis -- create a graph and compute its dominators.
> There might be an issue with Node.hasEdge, which is linear, since I avoid
> adding redundant edges to the graph.

That was definitely the problem.  I fixed it by removing the calls to
Node.hasEdge and adding a call to Graph.removeDuplicateEdges, which
runs in time proportional to the size of the graph.  After the fix,
commonArg now runs in 2.5s instead of 348s.

I see that contify.fun and multi.fun also make calls to Node.hasEdge.
It would be worth seeing if the same fix would work for them, even
though we haven't yet seen any performance problem there.