shared array?

ponce via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 13 09:53:18 PDT 2015


On Sunday, 13 September 2015 at 15:35:07 UTC, Jonathan M Davis 
wrote:
> But the idea that your average D program is going to run into 
> problems with the GC while using Phobos is just plain wrong. 
> The folks who need to care are the rare folks who need extreme 
> enough performance that they can't afford for the GC to _ever_ 
> stop the world.

Even in that case not all threads need to be real-time and you 
can do threads without GC.

Honestly I think only people using microcontrollers or really 
constrained environments and don't have the memory have that 
problem.

I suspect preciously few of the GC haters actually have those 
requirements or misrepresents the ways to avoid GC-related 
problems.

Same arguments but there is a solution for everything:

"Don't want memory overhead" => minimize heap usage, use -vgc / 
-profile=gc
"Don't want pauses" => unregister thread + @nogc
"Want shorter pauses" => minimize heap usage, use -vgc / 
-profile=gc
"Want determinism" => ways to do that

GC is basically ok for anything soft-realtime, where you already 
spend a lot of time to go fast enough. And if you want 
hard-realtime, well you wouldn't want malloc either.

It's a non-problem.





More information about the Digitalmars-d-learn mailing list