www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd -lib and executable size (+10 MB)

reply yidabu <yidabu.spam gmail.com> writes:
a program link in dsss builded dwt.lib, the executable size is 5 MB
link in "dmd -lib" builded dwt.lib, the executable size is 15 MB.

what's the issue?


tested with dmd 1.031, dwt-win recent svn, dsss 0.75



-- 
yidabu <yidabu.spam gmail.com>
http://www.dsource.org/projects/dwin

D ÓïÑÔ-ÖÐÎÄ(D Chinese):
http://www.d-programming-language-china.org/
http://bbs.d-programming-language-china.org/
http://dwin.d-programming-language-china.org/
http://scite4d.d-programming-language-china.org/
Jul 30 2008
next sibling parent reply "Lionello Lunesu" <lionello lunesu.remove.com> writes:
I got curious and wrote a batch file to test the exe sizes for all versions 
of dmd.exe in my local repository. The D file only has "void main() {}".

There's clearly a jump in filesize since v1.032, when the size went from 
79KB to 124KB.

Here's the complete result:

Digital Mars D Compiler v0.173
70.172  t.exe

Digital Mars D Compiler v0.174
68.636  t.exe

Digital Mars D Compiler v0.175
70.172  t.exe

Digital Mars D Compiler v0.176
68.636  t.exe

Digital Mars D Compiler v0.177
69.148  t.exe

Digital Mars D Compiler v0.178
69.148  t.exe

Digital Mars D Compiler v1.0
69.148  t.exe

Digital Mars D Compiler v1.001
73.244  t.exe

Digital Mars D Compiler v1.002
73.244  t.exe

Digital Mars D Compiler v1.003
73.244  t.exe

Digital Mars D Compiler v1.004
73.244  t.exe

Digital Mars D Compiler v1.005
73.756  t.exe

Digital Mars D Compiler v1.006
73.756  t.exe

Digital Mars D Compiler v1.007
73.756  t.exe

Digital Mars D Compiler v1.009
73.756  t.exe

Digital Mars D Compiler v1.010
75.804  t.exe

Digital Mars D Compiler v1.011
75.804  t.exe

Digital Mars D Compiler v1.012
75.804  t.exe

Digital Mars D Compiler v1.013
75.804  t.exe

Digital Mars D Compiler v1.014
76.316  t.exe

Digital Mars D Compiler v1.015
76.828  t.exe

Digital Mars D Compiler v1.017
76.828  t.exe

Digital Mars D Compiler v1.018
76.828  t.exe

Digital Mars D Compiler v1.019
76.828  t.exe

Digital Mars D Compiler v1.020
76.828  t.exe

Digital Mars D Compiler v1.021
76.828  t.exe

Digital Mars D Compiler v1.022
76.828  t.exe

Digital Mars D Compiler v1.023
78.364  t.exe

Digital Mars D Compiler v1.024
79.900  t.exe

Digital Mars D Compiler v1.025
79.900  t.exe

Digital Mars D Compiler v1.026
79.900  t.exe

Digital Mars D Compiler v1.027
79.900  t.exe

Digital Mars D Compiler v1.028
79.388  t.exe

Digital Mars D Compiler v1.029
79.900  t.exe

Digital Mars D Compiler v1.030
79.900  t.exe

Digital Mars D Compiler v1.031
79.388  t.exe

Digital Mars D Compiler v1.032
124.444  t.exe

Digital Mars D Compiler v1.033
124.444  t.exe
Aug 05 2008
next sibling parent reply "Bill Baxter" <wbaxter gmail.com> writes:
Ha ha.  You are dedicated, man.
Here's a small tribute to your dedication:
http://www.billbaxter.com/techblog/?p=9

--bb

On Wed, Aug 6, 2008 at 2:53 PM, Lionello Lunesu
<lionello lunesu.remove.com> wrote:
 I got curious and wrote a batch file to test the exe sizes for all versions
 of dmd.exe in my local repository. The D file only has "void main() {}".

 There's clearly a jump in filesize since v1.032, when the size went from
 79KB to 124KB.

 Here's the complete result:

 Digital Mars D Compiler v0.173
 70.172  t.exe

 Digital Mars D Compiler v0.174
 68.636  t.exe

 Digital Mars D Compiler v0.175
 70.172  t.exe

 Digital Mars D Compiler v0.176
 68.636  t.exe

 Digital Mars D Compiler v0.177
 69.148  t.exe

 Digital Mars D Compiler v0.178
 69.148  t.exe

 Digital Mars D Compiler v1.0
 69.148  t.exe

 Digital Mars D Compiler v1.001
 73.244  t.exe

 Digital Mars D Compiler v1.002
 73.244  t.exe

 Digital Mars D Compiler v1.003
 73.244  t.exe

 Digital Mars D Compiler v1.004
 73.244  t.exe

 Digital Mars D Compiler v1.005
 73.756  t.exe

 Digital Mars D Compiler v1.006
 73.756  t.exe

 Digital Mars D Compiler v1.007
 73.756  t.exe

 Digital Mars D Compiler v1.009
 73.756  t.exe

 Digital Mars D Compiler v1.010
 75.804  t.exe

 Digital Mars D Compiler v1.011
 75.804  t.exe

 Digital Mars D Compiler v1.012
 75.804  t.exe

 Digital Mars D Compiler v1.013
 75.804  t.exe

 Digital Mars D Compiler v1.014
 76.316  t.exe

 Digital Mars D Compiler v1.015
 76.828  t.exe

 Digital Mars D Compiler v1.017
 76.828  t.exe

 Digital Mars D Compiler v1.018
 76.828  t.exe

 Digital Mars D Compiler v1.019
 76.828  t.exe

 Digital Mars D Compiler v1.020
 76.828  t.exe

 Digital Mars D Compiler v1.021
 76.828  t.exe

 Digital Mars D Compiler v1.022
 76.828  t.exe

 Digital Mars D Compiler v1.023
 78.364  t.exe

 Digital Mars D Compiler v1.024
 79.900  t.exe

 Digital Mars D Compiler v1.025
 79.900  t.exe

 Digital Mars D Compiler v1.026
 79.900  t.exe

 Digital Mars D Compiler v1.027
 79.900  t.exe

 Digital Mars D Compiler v1.028
 79.388  t.exe

 Digital Mars D Compiler v1.029
 79.900  t.exe

 Digital Mars D Compiler v1.030
 79.900  t.exe

 Digital Mars D Compiler v1.031
 79.388  t.exe

 Digital Mars D Compiler v1.032
 124.444  t.exe

 Digital Mars D Compiler v1.033
 124.444  t.exe
Aug 05 2008
parent Lionello Lunesu <lio lunesu.remove.com> writes:
Bill Baxter wrote:
 Ha ha.  You are dedicated, man.
 Here's a small tribute to your dedication:
 http://www.billbaxter.com/techblog/?p=9
 
 --bb
 
:O that's really too much of an honor! I was not kidding when I said I made a batch file; that's really all it was. Great graph by the way, that would have taken me much longer to make! :) L. (Well, technically, it was a .btm file; did you know 4NT/TCC just became freeware? http://jpsoft.com/ )
Aug 06 2008
prev sibling next sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
Lionello Lunesu:
 Digital Mars D Compiler v1.031
 79.388  t.exe
 Digital Mars D Compiler v1.032
 124.444  t.exe
With the sources of 1.031 and 1.032 someone (the D developers too) can try to take the sources of 1.031 and add the changes of 1.032 one after the other testing what is the part that produces this executable swelling, to solve this problem. Maybe the build system of D can grow some "performance tests" (using both normal compilation and full optimized compilation) to keep an eye on: - running time of some benchmarks - their executable size - the time the compiler needs to compile them Bye, bearophile
Aug 06 2008
parent reply Lionello Lunesu <lio lunesu.remove.com> writes:
bearophile wrote:
 Lionello Lunesu:
 Digital Mars D Compiler v1.031
 79.388  t.exe
 Digital Mars D Compiler v1.032
 124.444  t.exe
With the sources of 1.031 and 1.032 someone (the D developers too) can try to take the sources of 1.031 and add the changes of 1.032 one after the other testing what is the part that produces this executable swelling, to solve this problem. Maybe the build system of D can grow some "performance tests" (using both normal compilation and full optimized compilation) to keep an eye on: - running time of some benchmarks - their executable size - the time the compiler needs to compile them Bye, bearophile
I sure miss Thomas's DStress statistics. I've been trying to get his test suite to work under Windows, but I should spent more time on it. L.
Aug 06 2008
parent reply BCS <ao pathlink.com> writes:
Reply to Lionello,


 I sure miss Thomas's DStress statistics. I've been trying to get his
 test suite to work under Windows, but I should spent more time on it.
 
 L.
 
what ever happened to that anyway?
Aug 06 2008
parent Sean Kelly <sean invisibleduck.org> writes:
BCS wrote:
 Reply to Lionello,
 
 
 I sure miss Thomas's DStress statistics. I've been trying to get his
 test suite to work under Windows, but I should spent more time on it.

 L.
what ever happened to that anyway?
Thomas dropped off the map shortly after the D conference last year. Sean
Aug 06 2008
prev sibling parent reply Moritz Warning <moritzwarning web.de> writes:
On Wed, 06 Aug 2008 13:53:07 +0800, Lionello Lunesu wrote:

 I got curious and wrote a batch file to test the exe sizes for all
 versions of dmd.exe in my local repository. The D file only has "void
 main() {}".
 
 There's clearly a jump in filesize since v1.032, when the size went from
 79KB to 124KB.
 
 Here's the complete result:
[..]
 Digital Mars D Compiler v1.033
 124.444  t.exe
Can anyone confirm that this is resolved now with dmd v1.034? My test shows that the binary size is back to 81KB (stripped).
Aug 10 2008
next sibling parent Extrawurst <spam extrawurst.org> writes:
well at least not fixed for dmd 2.018, the opposite is the case, it grew 
even more.


Moritz Warning wrote:
 On Wed, 06 Aug 2008 13:53:07 +0800, Lionello Lunesu wrote:

   
 I got curious and wrote a batch file to test the exe sizes for all
 versions of dmd.exe in my local repository. The D file only has "void
 main() {}".

 There's clearly a jump in filesize since v1.032, when the size went from
 79KB to 124KB.

 Here's the complete result:
     
[..]
 Digital Mars D Compiler v1.033
 124.444  t.exe
     
Can anyone confirm that this is resolved now with dmd v1.034? My test shows that the binary size is back to 81KB (stripped).
Aug 10 2008
prev sibling next sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
Moritz Warning:
 Can anyone confirm that this is resolved now with dmd v1.034?
 My test shows that the binary size is back to 81KB (stripped).
Walter has signed the problem as solved, but with 1.034 I see no changes in size, so the program is inflated still. If this will be confirmed the bug may be reopened :-) Bye, bearophile
Aug 10 2008
parent reply Moritz Warning <moritzwarning web.de> writes:
On Sun, 10 Aug 2008 09:00:18 -0400, bearophile wrote:

 Moritz Warning:
 Can anyone confirm that this is resolved now with dmd v1.034? My test
 shows that the binary size is back to 81KB (stripped).
Walter has signed the problem as solved, but with 1.034 I see no changes in size, so the program is inflated still. If this will be confirmed the bug may be reopened :-) Bye, bearophile
What compile options do you use? I just used "dmd main.d" followed by "strip main".
Aug 10 2008
parent reply bearophile <bearophileHUGS lycos.com> writes:
Moritz Warning:
 What compile options do you use?
For this benchmark the same I have used in the past, that means none at all: dmd test.d
 I just used "dmd main.d" followed by "strip main".
On Windows I haven't found a working strip for DMD yet. Bye, bearophile
Aug 10 2008
parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
"bearophile" wrote
 Moritz Warning:
 What compile options do you use?
For this benchmark the same I have used in the past, that means none at all: dmd test.d
 I just used "dmd main.d" followed by "strip main".
On Windows I haven't found a working strip for DMD yet.
I believe Windows binary format is already stripped (usually debug symbols are put into a separate file). -Steve
Aug 10 2008
prev sibling parent reply Michael P. <baseball.mjp gmail.com> writes:
Moritz Warning Wrote:

 On Wed, 06 Aug 2008 13:53:07 +0800, Lionello Lunesu wrote:
 
 I got curious and wrote a batch file to test the exe sizes for all
 versions of dmd.exe in my local repository. The D file only has "void
 main() {}".
 
 There's clearly a jump in filesize since v1.032, when the size went from
 79KB to 124KB.
 
 Here's the complete result:
[..]
 Digital Mars D Compiler v1.033
 124.444  t.exe
Can anyone confirm that this is resolved now with dmd v1.034? My test shows that the binary size is back to 81KB (stripped).
I didn't test compiling with just void main() { }, but when I re-compiled some of my work, the executable size went down from 1.033. So I would say it got resolved for the most part.
Aug 10 2008
parent reply Michael P. <baseball.mjp gmail.com> writes:
Michael P. Wrote:

 Moritz Warning Wrote:
 
 On Wed, 06 Aug 2008 13:53:07 +0800, Lionello Lunesu wrote:
 
 I got curious and wrote a batch file to test the exe sizes for all
 versions of dmd.exe in my local repository. The D file only has "void
 main() {}".
 
 There's clearly a jump in filesize since v1.032, when the size went from
 79KB to 124KB.
 
 Here's the complete result:
[..]
 Digital Mars D Compiler v1.033
 124.444  t.exe
Can anyone confirm that this is resolved now with dmd v1.034? My test shows that the binary size is back to 81KB (stripped).
I didn't test compiling with just void main() { }, but when I re-compiled some of my work, the executable size went down from 1.033. So I would say it got resolved for the most part.
Err, scratch that. When I compiled void main() { } with 'dmd main', the size was still 121kb, and my other executable sizes were the same too.
Aug 10 2008
parent Extrawurst <spam extrawurst.org> writes:
yup, mine too.. still huge, on D2 even bigger

Michael P. wrote:
 Michael P. Wrote:

   
 Moritz Warning Wrote:

     
 On Wed, 06 Aug 2008 13:53:07 +0800, Lionello Lunesu wrote:

       
 I got curious and wrote a batch file to test the exe sizes for all
 versions of dmd.exe in my local repository. The D file only has "void
 main() {}".

 There's clearly a jump in filesize since v1.032, when the size went from
 79KB to 124KB.

 Here's the complete result:
         
[..]
 Digital Mars D Compiler v1.033
 124.444  t.exe
         
Can anyone confirm that this is resolved now with dmd v1.034? My test shows that the binary size is back to 81KB (stripped).
I didn't test compiling with just void main() { }, but when I re-compiled some of my work, the executable size went down from 1.033. So I would say it got resolved for the most part.
Err, scratch that. When I compiled void main() { } with 'dmd main', the size was still 121kb, and my other executable sizes were the same too.
Aug 10 2008
prev sibling parent "Lionello Lunesu" <lionello lunesu.remove.com> writes:
I also checked the filesizes for "void main(){}" in the dmd2 branch. A 
similar jump in filesize was introduced with v2.016, when the exe went from 
81KB to 133KB.

Full log:

Digital Mars D Compiler v2.000
76.828  t.exe

Digital Mars D Compiler v2.001
76.828  t.exe

Digital Mars D Compiler v2.002
76.828  t.exe

Digital Mars D Compiler v2.003
76.828  t.exe

Digital Mars D Compiler v2.004
78.364  t.exe

Digital Mars D Compiler v2.005
78.364  t.exe

Digital Mars D Compiler v2.006
79.388  t.exe

Digital Mars D Compiler v2.007
79.900  t.exe

Digital Mars D Compiler v2.008
109.084  t.exe

Digital Mars D Compiler v2.009
80.924  t.exe

Digital Mars D Compiler v2.010
80.924  t.exe

Digital Mars D Compiler v2.011
81.436  t.exe

Digital Mars D Compiler v2.012
80.924  t.exe

Digital Mars D Compiler v2.013
80.924  t.exe

Digital Mars D Compiler v2.014
82.460  t.exe

Digital Mars D Compiler v2.015
80.924  t.exe

Digital Mars D Compiler v2.016
133.148  t.exe

Digital Mars D Compiler v2.017
133.148  t.exe
Aug 06 2008