[mercury-users] Generating small and fast binaries in Mercury

Nicholas Nethercote njn at csse.unimelb.edu.au
Fri Jul 6 19:48:07 AEST 2007

On Fri, 6 Jul 2007, Michael Day wrote:

>> My experience with Cygwin has been that a basic hello world
>> application takes up at least 1.6MB in asm_fast.gc, but only around
>> 1MB in hlc.gc, and more in the various profiling and debugging grades.
>> You could try using hlc.gc, but it makes bigger files for some files
>> (for example, I have found that extras/xml is generally larger with
>> hlc.gc).  Under Linux binaries are generally smaller because shared
>> libraries are used.  I'm afraid that this is a reality of high-level
>> languages and libraries - they take up more space because a lot more
>> functionality is used.
> While in general that's true, for a basic hello world program hardly any 
> functionality is being used at all. It would be interesting to see a break 
> down of how much of the resulting binary is taken up by the runtime, the 
> garbage collector and the standard library; particularly comparing how much 
> of the standard library is included in the binary but never actually called 
> :)

I tried statically linking Hello World written in C on an x86/Linux machine, 
it was just under 500KB.

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

More information about the users mailing list