[m-rev.] diff/for review: improving the compiler's worst case performance

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Jan 11 14:14:28 AEDT 2005


On 10-Jan-2005, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> I have tested the effect of this diff on the performance of the compiler
> using tools/speedtest, which times the compilation of the six largest
> modules of the compiler. The result was that this diff generates a 1.7%
> slowdown. However, on the file generated by caribou, car.m, it yields
> a 55% speedup:
> 
> 	lmc11 -vS car.m >& LMC11
> 	122.710u 0.850s 2:09.12 95.6%   0+0k 0+0io 3721pf+0w
> 	lmc20 -vS car.m > & LMC20
> 	79.050u 0.470s 1:19.99 99.4%    0+0k 0+0io 3720pf+0w
> 
> lmc11 is the original compiler, lmc20 is the one with the following changes.

I just realized that the above numbers are with the new compiler having
its sanity-check code for one of the optimizations in place. Since this
sanity check runs the old algorithm as well as the new (to compare their
results), it is significantly slower than it should be. I have measured
the new compiler's performance again without the sanity check. For compiling
car.m, the speedup is 61%, not 55%. For compiling the compiler modules,
I now get an 8.1% speedup, not a 1.7% slowdown.

That is the biggest single speedup of the compiler I can remember since
we fixed the bug that caused our 2-3-4 trees to be unbalanced.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list