[m-dev.] preliminary MLDS performance comparisons
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue May 23 03:21:12 AEST 2000
Now that I've implemented optimization of static ground terms,
it's time to redo some of those performance comparisons.
As well as implementing the `--static-ground-terms' optimization,
there was another change that may have had a significant effect:
for correctness reasons, I changed the MLDS back-end to never inline
`pragma c_code'. That may have caused a significant decrease in
speed and perhaps also a small decrease in code size.
Sometime soon `pragma c_code' will be reimplemented in such a way that
it can safely be inlined, at which time we can expect an increase in
performance and perhaps a small increase in code size.
On 13-May-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Second, here's a comparison of code size.
> I compiled the compiler with the MLDS back-end, and compared this
> with its size when compiled with the LLDS back-end
>
> ------ size (kbytes) -------
> Compiled with Improvement file text data bss
> -O2 --opt-space [*] 5423 5331 79 44
> -O2 --opt-space -H 33% 4084 4035 7 47
>
> [*] The standard library was compiled with --intermodule-optimization.
With the latest compiler, I get the following figures:
-O2 --opt-space -H [*] 39% 3897 3849 7 47
Note that the `text' size here includes 652 kb of read-only data.
> ----------
>
> Finally, here's a comparison of the speed of the generated code.
> I compared two versions of the compiler, both compiled with -O2 --opt-space,
> one with the MLDS back-end (-H), the other with the LLDS back-end.
...
> Compiled with Input file Options Slowdown user time (s)
> -O2 --opt-space inst_match.m -C -O5 21.1
> -O2 --opt-space -H inst_match.m -C -O5 27% 26.8
> -O2 --opt-space inst_match.m -C -O0 9.3
> -O2 --opt-space -H inst_match.m -C -O0 21% 11.4
BTW, I made a mistake when recording my results there: the input file
was table_gen.m, not inst_match.m. (This caused me some confusion
when trying to reproduce my results ;-)
With the latest compiler, I get the following figures:
-O2 --opt-space -H table_gen.m -C -O5 17% 24.6
-O2 --opt-space -H table_gen.m -C -O0 10% 10.2
So it's still slower than the LLDS back-end at the same optimization
level, but the slowdown is smaller (ranging from 10%-17%, rather than
from 21%-27%).
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list