[m-dev.] preliminary MLDS performance comparisons

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 24 03:45:03 AEDT 2000


On 23-Nov-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
>                                           --- Times in seconds ---
>     GRADE         C compiler    Options   Trail 1  Trial 2  Average
>     -----         ----------    -------   -------  -------  -------
>     none.gc       cc            -O1       10.30    10.32      10.31
>     hlc.gc        cc            -O1        7.13     7.09       7.11
>     hlc.gc        cc            -O3        6.98     7.02       7.00
>     hlc.gc        cc -migrate   -O4        6.80     6.86       6.83
>     hlc.gc        gcc           -O2          (not yet available)
>     asm_fast.gc   gcc           -O2        6.71     6.73       6.72

Some more data points:

      hlc.gc        gcc           -O2        6.70     6.73       6.72
      hlc.gc        cc -migrate   -O5        7.02     7.00       7.01

So with gcc, the hlc.gc grade runs at almost exactly the same speed as
asm_fast.gc on this benchmark!  If anything it might be slightly faster,
but the difference is within measurement error.

There are still a couple of optimizations which are present in the
LLDS back-end are still not yet implemented in the MLDS back-end:
	- lookup switch optimization
	- reverse tag test optimization for types with two functors
However, I don't expect to get big speed-ups for those.

As I expected, `cc -migrate -O5' is worse than `cc -migrate -O4'
for this benchmark.  Likewise I would expect `gcc -O3' to be worse
than `gcc -O2', since it is on the x86, but I haven't actually
measured it on the Alpha.

But I was somewhat surprised that gcc did better than cc for compiling
the MLDS version of the Mercury compiler, since I have heard that cc
on the Alpha is reputed to be much better than gcc for many
benchmarks.

Next, looking at size:
>                                                --- Size in Mb ---
>     GRADE           C compiler      Options    Text   Data   File
>     -----           ----------      -------    ----   ----   -----
>     none.gc         cc              -O1        15.45  2.393  17.89
>     hlc.gc          cc              -O1         7.54  0.776   8.34
>     hlc.gc          cc              -O3         7.45  0.753   8.24
>     hlc.gc          cc -migrate     -O4         7.18  0.745   7.98
>     hlc.gc          gcc             -O2         (not yet available)
>     asm_fast.gc     gcc             -O4         8.79  0.836   9.65

      hlc.gc          gcc             -O2         7.25  0.201   7.47
      hlc.gc          cc -migrate     -O5         7.48  0.745   8.27

GNU C does better than `cc' on code/data size too, bringing the
difference between the MLDS and LLDS file sizes up to almost 30%.

The big difference in data size between gcc and the rest is probably
because gcc puts more stuff in read-only data, which gets counted as
"text".

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- 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