www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Great way to decrease D executable sizes

reply kinghajj <kinghajj_member pathlink.com> writes:
(Note: I'm using linux, but this should work for windows if you have 'strip.exe'
and UPX).

First, I stripped the executable (in this case, wc)

COMMAND:
strip wc

That decreased the filesize to 68% of the original (appearently, D leaves lots
to strip in it's executables!)

Then, I used UPX to compress the file.

COMMAND:
upx -o wc_c wc -9

Which lowered the filesize to 28% of the original (27758 B).

So, if you've been angry ad D's larger-than-noraml executable sizes, now you can
fix it ;D
May 24 2004
next sibling parent Ant <duitoolkit yahoo.ca> writes:
On Tue, 25 May 2004 04:20:45 +0000, kinghajj wrote:

 (Note: I'm using linux, but this should work for windows if you have
'strip.exe'
 and UPX).
 
 First, I stripped the executable (in this case, wc)
 
 COMMAND:
 strip wc
 
 That decreased the filesize to 68% of the original (appearently, D leaves lots
 to strip in it's executables!)
 
 Then, I used UPX to compress the file.
 
 COMMAND:
 upx -o wc_c wc -9
 
 Which lowered the filesize to 28% of the original (27758 B).
 
 So, if you've been angry ad D's larger-than-noraml executable sizes, now you
can
 fix it ;D
nice. for a linux exec (leds): original 2_832_076 striped 2_052_952 upxed 594_183 (21%) which is smaller then the gziped version from the striped (678_043). Ant
May 25 2004
prev sibling parent reply Norbert Nemec <Norbert.Nemec gmx.de> writes:
kinghajj wrote:

 (Note: I'm using linux, but this should work for windows if you have
 'strip.exe' and UPX).
 
 First, I stripped the executable (in this case, wc)
 
 COMMAND:
 strip wc
 
 That decreased the filesize to 68% of the original (appearently, D leaves
 lots to strip in it's executables!)
 
 Then, I used UPX to compress the file.
 
 COMMAND:
 upx -o wc_c wc -9
 
 Which lowered the filesize to 28% of the original (27758 B).
 
 So, if you've been angry ad D's larger-than-noraml executable sizes, now
 you can fix it ;D
I would assume you get similar ratios for C++ files.
May 25 2004
parent School <itsnotvalid-news yahoo.com.hk> writes:
Norbert Nemec wrote:
 I would assume you get similar ratios for C++ files.
but not with C files.
May 28 2004