Summary: .init contains zeroes
           Product: D
           Version: 2.023
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P3
         Component: DMD

Typical class has its fields all set to zeroes so .init member of this class
usually contains plain zeroes, which can result in intensive spam from
compiler. Consider this code:
class A
    int[10] a;

void main()
    auto a=new A();
which in compiled form takes 96kb and after raising array size to 10000,
compiled execatable takes 135kb. So as number of class declarations grows,
object code gets polluted with zeroes.


Reply via email to