[Issue 6498] New: [CTFE] copy-on-write is slow and causes huge memory usage

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 15 00:54:11 PDT 2011


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

           Summary: [CTFE] copy-on-write is slow and causes huge memory
                    usage
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


--- Comment #0 from Don <clugdbug at yahoo.com.au> 2011-08-15 00:54:10 PDT ---
This is the main reason why CTFE is so slow.

int bug6498(int x)
{
    int n = 0;
    while (n < x)
        ++n;
    return n;
}
static assert(bug6498(10_000_000)==10_000_000);

--> Fails with an 'out of memory' error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list