Re:Why is D's garbage collection slower than GO's?
by zozbot234 on Saturday October 29, 2022 @05:52AM
(#33382537)
That's just trading a fragmented heap for fragmented page tables, though. Modern OS's even support "huge" pages to specifically avoid that page table overhead.
Re:Why is D's garbage collection slower than GO's?
by chrisseaton on Saturday October 29, 2022 @07:55AM
(#33383250)
Why do you say ‘just’? It’s an effective technique.
Re:Why is D's garbage collection slower than GO's?
by _rlh on Saturday October 29, 2022 @07:48AM
(#33383200)
Still one of the best ideas in the field in recent years. I will note that it also works for non-moving GC collectors and if they are precise, like Go, they can also update pointers and eliminate the redundant page table entries.
I was astonished to learn that researchers found a way to implement a compacting malloc (!!!) by using very clever virtual memory tricks - and which they were able to use to demonstrate memory usage improvements in a long-running Redis instance that used their drop-in malloc replacement:
https://www.youtube.com/watch?v=xb0mVfnvkp0