Executable size

Robert Fraser fraserofthenight at gmail.com
Fri May 9 11:00:55 PDT 2008


Steven Schveighoffer wrote:
> "Frank Benoit" wrote
>> The compiled code for Java SWT+JFace
>> swt.jar   1.9  MB
>> jface.jar 0.95 MB
>>
>> I would expect that this code ported to D should result in a smaller 
>> amount of code. Java hold all the reflection information, D not. Afaik jar 
>> is a zip without using compression.
>> A compiled DWT app as .exe is about 7 MB and using JFace 14 MB.
>>
>> Why is that? How can it be done better?
> 
> If you want to compare apples to apples:
> 
> unjar the swt and jface files (this will make a directory structure, find 
> out how much space that takes up). Jar files are compressed.
> 
> Compile DWT and D JFace into libraries.
> 
> Compare those sizes.
> 
> The built executables include tango/phobos, so you cannot compare that 
> version, unless you want to add in the java runtime jar files :)
> 
> D has some reflection information through the typeinfo classes, so I would 
> expect the uncompressed sizes to be roughly equivalent.
> 
> Once D is natively using DLL/.so to store the runtime, executable sizes 
> should go way down.
> 
> -Steve 

I doubt it. ALl of Tango compiled I think is like 7MB, and I doubt DWT i 
using more than a fraction of Tango.



More information about the Digitalmars-d mailing list