On 2014-05-29 11:03:11 +0000, Wanderer said:

It will be hard to beat Java's garbage collector. They use generational, sequential memory approach, while D's memory manager (correct me if I'm wrong) uses more common approach and has to deal with possible memory fragmentation. Allocating a new object is extremely cheap in Java, literally a few machine instructions, and there is no locking because each thread has its own eden memory and they never overlap.

Unless D introduces the possibility to move objects around in heap (which is not possible with the support of pointers, I guess) and eliminate the fragmentation, it will be hard to make GC as fast. Just 3% of difference look great enough to me. :-)

I was under the impression that the D gc does move objects around on the heap and then update the pointers.

Reply via email to