digitalmars.D - Any plans to fix this?
- Mehrdad (3/3) Mar 04 2012 Are there any plans to fix the GC so that it actually _works_ (with
- Timon Gehr (2/5) Mar 04 2012 http://prowiki.org/wiki4d/wiki.cgi?GSOC_2012_Ideas
- Robert Jacques (3/6) Mar 04 2012 The GC actually works fairly well with normal buffer sizes for your exam...
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
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=7251http://prowiki.org/wiki4d/wiki.cgi?GSOC_2012_Ideas
Mar 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=7251The 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