logoalt Hacker News

imtringuedtoday at 1:34 PM1 replyview on HN

The moment you turn on garbage collection in Dlang, you've introduced stop the world pauses to all your Dlang threads.

If you were to implement a Rust GC, then Rust can guarantee that references haven't escaped the current thread, which means there is no stop the world pause anymore, only the current thread gets paused, which is acceptable.


Replies

bencyoungtoday at 2:30 PM

Unless your memory allocator runs a form of garbage collection, which most of the advanced ones do! Worst memory performance issue I've ever seen was in a C++ program where the deallocation of a large object graph from one spot completely trashed the performance of the application across many threads...