What is the size of a module?

Neal Alexander WQEQWEUQY at HOTMAIL.COM
Sun May 18 20:18:28 PDT 2008


Frank Benoit wrote:
> I want to get an understanding what can make DWT executables smaller and 
> if the modules count is really relevant for it.
> 
> So the question... A given amount of classes/interfaces etc exist. Now a 
> design decision should be made how this code shall be structured into 
> modules and packages.
> 
> What exactly are the costs for moving code into a new module?
> What does affect the resulting binary size?
>  - length of typenames
>  - count of import that the new module has
>  - count of modules that import the new module
>  - static this entry in the module
>  - ?
> 
An empty module is like 500 bytes IIRC.

When porting large C headers to D, the biggest factor is the generation 
of default initializers for the structs i think.



More information about the Digitalmars-d mailing list