AA performance again

Walter Bright newshound1 at digitalmars.com
Mon Jun 9 13:25:19 PDT 2008


bearophile wrote:
> Sometimes the simplest code is enough to show a problem. Other gentle
> people in the #D channel say those timings aren't random: 
> http://leonardo-m.livejournal.com/64284.html
> 
> The D versions eat 425 MB with 10 million longs and about 757 MB RAM
> with dmd with 20 million longs.


I've investigated a similar issue before, and discovered it has nothing 
to do with AAs. What is consuming the time is, as the memory usage 
grows, the garbage collector repeatedly kicks in to look for things to 
free. You can see this by wrapping the loop in:

     std.gc.disable();
     ... loop ...
     std.gc.enable();




More information about the Digitalmars-d mailing list