A collection of DIPs

Brandon Ragland via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 10 18:04:55 PDT 2015


On Wednesday, 9 September 2015 at 18:21:32 UTC, NX wrote:
> On Wednesday, 9 September 2015 at 14:00:52 UTC, Brandon Ragland 
> wrote:
>> It's slow, really slow, and stopping the entire world is 
>> painful, even in trivial user applications. A pause for even 
>> half a second or less on the UI makes the application looks 
>> "chunky" and broken.
>
> If you're having that much serious problems then there is only 
> one thing I can think of: Your computer is survived from 90s
>
> The more you don't collect, the more time it takes time to 
> collect; thus, you may want to configure GC to do it's job more 
> often so it doesn't stop significantly, and also manually 
> trigger collection where appropriate...

This might be true, however even small collections, run multiple 
times, can still sum to the total collection time, even if 
delayed.

In video games, this becomes an issue: lag spikes every 5 
seconds, or generally reduced frame-rate from 30 to 20 FPS. It 
does make a difference in the end game.

In time sensitive trading data, there are scenarios in which a 
1millisecond delay could cost a few penance, times however many 
shares you bought.

The bottom line, is there's a reason even Java and C# aren't 
"widely" used in such time sensitive issues, because they're 
generally slower, than the old CBOL or newer technologies running 
on C or the likes.

However, when once compares Java's or C#'s GC to D, the 
difference is so dramatic, it makes me say one thing: Is D's 
garbage collector really from the 90's?

That's the level of thought and sophistication that went into it. 
That of the earliest GC from the 90's and early 2000's era. It's 
been almost 20 years. It's really time to catch up guys.

There's really no excuse why D is still using a GC from an era 
almost 2 decades ago.

The JDK has supported generational GC since 1.2 and parallel GC 
from (don't quote me) 1.4 or perhaps earlier.

Parallel GC has been a feature of most modern languages for close 
to, if not exceeding, 10 years now. D is still using a basic GC 
that only saw light of day in Java a decade ago or longer.

The more time that goes by, the better Java, C#, Pyhton, etc. get 
at Garbage Collection, and the changes in D have stalled. We are 
sinking in a boat fast.

There was a lovely article by a fellow for his PhD on how D 
garbage collector was literally killing his JavaScript engine, 
using some 100X more GC time than Java would have, and he 
contemplated switching from D for that reason alone. That 
article, found on reddit, is what "made" the leadership for D 
consider a rewrite of the GC. Well one year on, and it still 
hasn't happened. That's very dismal progress for a very critical 
part of the puzzle.

And @nogc is just a band-aid fix. Might as well go back to C or 
C++ and leave the silly @nogc behind with all it's weird 
integration rules when working around managed memory.

~Peace








More information about the Digitalmars-d mailing list