shared array?

Ola Fosheim Grøstad via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 13 09:58:21 PDT 2015


On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis 
wrote:
> the GC heavily. And the reality of the matter is that the vast 
> majority of programs will have _no_ problems with using the GC 
> so long as they don't use it heavily. Programming like you're 
> in Java and allocating everything on the heap will kill 
> performance, but idiomatic D code doesn't do that, and Phobos 
> doesn't do that. Far too many programmers freak out at the 
> thought of D even having a GC and overreact thinking that they 
> have to root it out completely, when there really is no need 
> to. Plenty of folks how written highly performant code in D 
> using the GC. You just have to avoid doing a lot of allocating 
> and make sure you track down unwanted allocations when you have 
> a performance problem.

I don't understand this argument. Even if the GC heap only 
contains a single live object, you still have to scan ALL memory 
that contains pointers.

So how does programming like you do in Java affect anything 
related to the GC?

Or are you saying that finalization is taking up most of the time?



More information about the Digitalmars-d-learn mailing list