Any plans to fix this?

Robert Jacques sandford at jhu.edu
Sun Mar 4 10:10:31 PST 2012


On Sun, 04 Mar 2012 04:27:25 -0600, Mehrdad <wfunction at 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.


More information about the Digitalmars-d mailing list