The D standard library is built on GC, is that a negative or positive?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu Dec 15 12:55:22 UTC 2022


On Thursday, 15 December 2022 at 12:36:59 UTC, IGotD- wrote:
> I'm amazed how much the tracing GC is used in the computer 
> industry despite its complexity and drawbacks. When will the 
> time come when the tracing GC no longer scales with increasing 
> memory consumption?

We will most likely see coprocessors working on regular memory, 
and like now, people will use no-gc libraries for the low latency 
heavy lifting. Another hardware solution would be to let cores 
have local memory, then people will switch to pushing data as 
values through a pipeline and avoid references. That would scale 
well, but requires developers to switch to a new more 
"functional" mindset.

Anyway, concurrent collectors that don't stop the world are not 
as bad if you add hardware capabilities that prevents the caches 
for being flushed and the data-bus from being saturated. You 
could have a separate hardware-cache for book-keeping tasks and 
just slowly scan memory in the background rather than the 
hit-and-run approach.

Besides, most applications don't really need the full 
capabilities of modern hardware so the users don't mind 
applications being slow as they don't "understand" that they are 
actually slow… :-) That's what makes javascript and dart 
competitive for application development.




More information about the Digitalmars-d mailing list