[m-rev.] preliminary review: Removing dead code at link time.

Peter Wang novalazy at gmail.com
Mon Aug 11 11:15:55 AEST 2014


On Fri, 08 Aug 2014 12:05:35 +0200 (CEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> 
> On Fri, 8 Aug 2014 11:12:10 +1000, Peter Wang <novalazy at gmail.com> wrote:
> > On Linux/x86-64, `hello' goes from 4.1 MiB to 663 KiB in size
> > and `mercury_compile' goes from 16 MiB to 13 MiB.
> > (both statically linked to the Mercury libraries and stripped)
> 
> Did you measure the effect on the time taken by (a) the C compiler
> and (b) the linker?

Here is the effect on the compiler directory.

COMPILING
---------
Times for "mmake -j6 os" in the compiler directory
after making the .c files previously.

% baseline
344.55s user 8.04s system 573% cpu 1:01.52 total

% --split-sections
347.98s user 8.47s system 588% cpu 1:00.56 total

LINKING
-------
Times for "mmake -j6 top_level"
after making the .o files in the previous step.

% baseline
1.84s user 0.17s system 97% cpu 2.055 total

% --split-sections
2.49s user 0.27s system 98% cpu 2.805 total

% --split-sections --strip-dead-sections
18.93s user 0.26s system 99% cpu 19.207 total

% How long make takes to figure out that everything is up-to-date.
1.26s user 0.06s system 98% cpu 1.348 total

Peter



More information about the reviews mailing list