[Issue 2642] New: .init contains zeroes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 2 02:52:49 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2642

           Summary: .init contains zeroes
           Product: D
           Version: 2.023
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: maxmo at pochta.ru


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.


-- 



More information about the Digitalmars-d-bugs mailing list