[mercury-users] Executable size

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 11 16:15:31 AEST 1999


On 11-Oct-1999, Robert Ernst Johann JESCHOFNIK <rejj at cat.cs.mu.OZ.AU> wrote:
> Has the Mercury runtime grown recently? Just to see what would happen, I
> compiled my graphics assignment (written with Mercury 0.8 [or 0.8.1] in
> mind) with rotd-1999-10-10.. and noticed that the binary produced was
> about 26k larger. I used the same Mmakefile, which sets the mcflags
> --intermodule-optimization, -O 6, and the mgnucflag
> -DML_OMIT_ARRAY_BOUNDS_CHECKS. With 0.8 the binary was 63,764 bytes, and
> with the ROTD it was 89,564 bytes.
> 
> I'm just curious as to why.

Probably those sizes are for a dynamically linked executable,
in which case the size of the runtime won't affect them.

I don't know off-hand what the increase is due to.  It may be due to
more aggressive inlining (see my response to your other email).
Another possible cause is extra run-time type information; we now keep
some additional RTTI about closures so that you can call copy/2 on
higher-order terms.

You might want to try running `size -f' or `size -A' on the executable;
that can give more information about whether the increase is an
increase in code size, in read-only data, etc.

-- 
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-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list