Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 21, 2005 How to reduce executable size | ||||
---|---|---|---|---|
| ||||
Hi there, Even the simplest D program "void main(){}" is compiled into 80+ kilobytes by dmd (win32) in release mode. Is there some way to reduce the code size? Thanks in advance. |
January 21, 2005 Re: How to reduce executable size | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anonymous | maybe use some tools like upx?:) Yicheng "Anonymous" <Anonymous_member@pathlink.com> wrote in message news:csraoo$9q9$1@digitaldaemon.com... > Hi there, > > Even the simplest D program "void main(){}" is compiled into 80+ > kilobytes by dmd (win32) in release mode. > Is there some way to reduce the code size? > > Thanks in advance. > > |
January 21, 2005 Re: How to reduce executable size | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anonymous | Anonymous wrote: > Even the simplest D program "void main(){}" is compiled into 80+ > kilobytes by dmd (win32) in release mode. > Is there some way to reduce the code size? The main reason a C++ program is smaller is that it uses a dynamic run-time library. D uses a static "phobos" library. If C++ is compiled with a static runtime as well, I find the executables it generates to be a lot larger than the D ones ? But C is still a lot smaller. Not that 80 KB is anything... --anders PS. Here are my sizes: > 12K hello_c > 368K hello_cpp > 100K hello_d > 4.0K hello.jar For "Hello, World!"... |
January 21, 2005 Re: How to reduce executable size | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anonymous | In article <csraoo$9q9$1@digitaldaemon.com>, Anonymous says... > >Hi there, > >Even the simplest D program "void main(){}" is compiled into 80+ >kilobytes by dmd (win32) in release mode. >Is there some way to reduce the code size? > >Thanks in advance. > > Yes; convince Walter to remove printf() from Object.d ... it drags along all the floating point library support, just for jollies. |
Copyright © 1999-2021 by the D Language Foundation