[Prev][Next][Index][Thread]
Re: Reducing exe size?
In article
<Pine.GSO.4.21.0112131119470.3709-100000@godzilla.ce.chalmers.se>,
Robert Feldt <feldt@ce.chalmers.se> wrote:
> Hi again,
>
> Is there some way to decrease the size of exe's produced by d2c?
>
> When compiling the hi program created by "make-dylan-app hi" it starts out
> at 2102496 bytes. By stripping it I can get down to 1371136 and by packing
> with UPX I get down to 320000 which is much better but still a bit steep
> for a hello world.
Yeah it sucks and we'd like it to be smaller.
I've got a hazy long term plan to address it. Basically, you'd need an
option to defer all C code generation until the main program is
compiled, and then emit the C lazily so that each function and global
data structure is generated only if something else needs it. A lot of
work, and it's not really clear how much would *actually* be saved.
Hmm. Andreas Bogk just checked in a new d2c mode that allows you to
compile a bare Dylan file into a single C file. It might be possible to
(semi?) manually go through one of those and find out what is and isn't
needed as a test case. Well, maybe a Perl script or something :-)
But in any case a MB or two overhead isn't that big a deal today. It's
what ... a third of a cent of disk, and 10 cents of RAM? Something like
that, and getting less each month.
I hate bloat, but it's getting harder and harder to get excited about
it. Certainly I care about speed and features far more.
-- Bruce
Follow-Ups:
References: