[m-rev.] diff: speed up equiv_types_hlds.m
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Feb 25 20:23:42 AEDT 2015
I had a look at how the compiler is handling Dirk's problematic module.
Almost all the time is spent in mode checking, either during the initial
mode analysis or reruns of it during e.g. simplification, with only two other
passes taking significant amounts of time on their own: equivalence
type expansion and quantification. This diff speeds up the former,
taking it from this:
% Fully expanding equivalence types... done.
[User time: +1.240s, 9.410s, Real time: +1.241s, 9.500s, D Stack: 4.109k, ND Stack: 0.078k, C Stack: 10.415k,
to this:
% Fully expanding equivalence types... done.
[User time: +0.200s, 8.420s, Real time: +0.206s, 8.506s, D Stack: 4.109k, ND Stack: 0.078k, C Stack: 10.415k,
I also have an idea for how to speed up mode checking, but that
is a more involved change.
I am committing this diff on the master branch. Julien, you may want
to apply it to the release branch as well. BTW, I did *not* find any
significant difference between the speed of the 14.01 and the current
compilers on Dirk's test case, though the current compiler did report
a bug in one of his mode declarations.
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.inst_tables
Type: application/octet-stream
Size: 331 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20150225/18bd6c00/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.inst_tables
Type: application/octet-stream
Size: 11895 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20150225/18bd6c00/attachment-0001.obj>
More information about the reviews
mailing list