Thread overview
Any plans to fix this?
Mar 04, 2012
Mehrdad
Mar 04, 2012
Timon Gehr
Mar 04, 2012
Robert Jacques
March 04, 2012
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 

March 04, 2012
On 03/04/2012 11:27 AM, Mehrdad 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

http://prowiki.org/wiki4d/wiki.cgi?GSOC_2012_Ideas
March 04, 2012
On Sun, 04 Mar 2012 04:27:25 -0600, Mehrdad <wfunction@hotmail.com> 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.