On Sun, 04 Mar 2012 04:27:25 -0600, Mehrdad <[email protected]> wrote:
Are there any plans to fix the GC so that it actually _works_ (with
nontrivial buffer sizes)?

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


The GC actually works fairly well with normal buffer sizes for your example. It 
even supports large *buffers* extremely well. But, your example isn't about 
buffers. It's about array building. No language supports appending to a vector 
at scale well; whether D's runtime crashing (i.e. fail early, fail often) vs 
other languages' silent, massive performance and/or memory hit is better or 
worse is debatable.

The right solution is to use a better algorithm: in D, you're supposed to use 
appender. Now, the current appender does have its own issues, 
(http://d.puremagic.com/issues/show_bug.cgi?id=5813), but hopefully I'll finish 
putting together the pull request sometime next week.

Reply via email to