Executable size
Steven Schveighoffer
schveiguy at yahoo.com
Thu May 8 08:00:15 PDT 2008
"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
More information about the Digitalmars-d
mailing list