Am 11.05.2014 10:53, schrieb Walter Bright:
On 5/11/2014 1:22 AM, Benjamin Thaut wrote:

This is not quite correct. The Boehm GC knows nothing about the
interiors of structs.

The D one does (or at least has the capability of doing so using
RTinfo). This means that the D collector can be 'mostly' precise, the
imprecision would be for stack data.

Mostly percise doesn't help. Its either fully percise or beeing stuck with a impercise mark & sweep. Also D's GC doesn't use RTInfo currently. Additionally Rainer Schuetzes implementation showed that using RTInfo with the current GC makes the collection actually slower at the price of beeing 'mostly' percise. So I argue that the level of GC support we have is still at the level of C/C++.


The Boehm collector cannot move objects around, the D one can.


Oh it can? Really? I would love to see how well interfacing with any C library works, if the D garbage collector actually does that. I bet GTKd would break the first second this is implemented. Or any other C library that exchanges data with D for that matter. The D garbage collector can not simply move around objects because we don't support pinning.

Also I'm talking about what the D garbage collector currently actually does, and not what it could do. If we actually would implement arc, it would most likely take less time then a full blown proper gc and we would end up with better performance than we currently have. Beating the 300% slowdown which the current GC imposes is not that hard.

If we however keep arguing what a GC could do, we will be stuck with the impercise mark & sweep forever. (or at least the next 5 years)

Reply via email to