www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Any plans to fix this?

reply "Mehrdad" <wfunction hotmail.com> writes:
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 
Mar 04 2012
next sibling parent Timon Gehr <timon.gehr gmx.ch> writes:
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
Mar 04 2012
prev sibling parent "Robert Jacques" <sandford jhu.edu> writes:
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.
Mar 04 2012