[m-rev.] diff: disable GC during startup

Peter Wang novalazy at gmail.com
Fri May 6 12:35:37 AEST 2011

On 2011-05-05, Peter Wang <novalazy at gmail.com> wrote:
> [On my machine, this reduced the run time of an empty Mercury program in
> the hlc.gc grade from 2.7 ms to 1.1 ms.  The equivalent C program takes
> 0.26 ms.  The Mercury libraries were statically linked.  Measured with a
> simple C program which does fork/exec/wait in a loop to avoid shell
> overhead.  CPU frequency scaling was disabled.]

For an unknown reason, this change doesn't only affect the startup time.
I timed the compilation of most compiler/*.m modules, with and without
this change.  Most modules took less time to compile, but some took

compiler built in hlc.gc
worse:        3 modules, total + 0.004 s
better:     410 modules, total -13.88 s
overall:    348.80 s -> 334.92 s (3.98% speedup)

compiler built in asm_fast.gc
worse:	    124 modules, total +2.30 s
better:	    287 modules, total -7.64 s
overall:    336.70 s -> 331.35 s (1.59% speedup)

mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au

More information about the reviews mailing list