September 23, 2013 Re: compiled code file size | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On Sat, Sep 21, 2013 at 09:41:30PM +0200, Vladimir Panteleev wrote: > On Friday, 20 September 2013 at 16:20:34 UTC, Duke Normandin wrote: > >I'm re-visiting the D language. I've compared the file sizes of 2 executables - 1 is compiled C code using gcc; the other is D code using dmd. > > > >helloWorld.d => helloWorld.exe = 146,972 bytes > >ex1hello.c => ex1-hello.exe = 5,661 bytes > > > >Why such a huge difference??? > > You can upload a .map file here, and see what's taking up all the > space: > http://thecybershadow.net/d/mapview/ Ah, you beat me to it. :-) T -- All problems are easy in retrospect. |
September 23, 2013 Re: compiled code file size | ||||
---|---|---|---|---|
| ||||
On Sep 21, 2013, at 8:49 AM, Manu <turkeyman@gmail.com> wrote:
> On 21 September 2013 21:34, Temtaime <temtaime@gmail.com> wrote:
> Are you saying about passing a function via pointer to winapi for example?
> The logic is simple: if someone gets function address, then function cannot be stripped. It's logic of all c++ compilers.
>
> Totally OT, but every single time I read your name when you post, I can't help but start hearing lines from Terry Prachett's Hogfather in my head…
Same here.
|
September 24, 2013 Re: compiled code file size | ||||
---|---|---|---|---|
| ||||
Posted in reply to Temtaime Attachments:
| On Sep 20, 2013 5:40 PM, "Temtaime" <temtaime@gmail.com> wrote: > > DMD likes the size. > When compiling, compiler may use GBs of RAM. > In resulting executable there is no dead/unused code elimination. Three random sentences that are not at all factual. :) Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; |
Copyright © 1999-2021 by the D Language Foundation