Why is D's GC slower than GO's?

Walter Bright newshound2 at digitalmars.com
Wed Nov 2 00:49:14 UTC 2022


On 10/31/2022 9:46 AM, Adam D Ruppe wrote:
> On Sunday, 30 October 2022 at 02:15:06 UTC, Walter Bright wrote:
>> Besides, if it was so easy to do, why has nobody produced a C compiler that 
>> uses a GC instead of malloc/free?
> 
> Well, it has been done with Bohem.

D's GC is very similar to the Boehm one, but more accurate since the D compiler 
provides layout info to the GC.


> But anyway I wrote up my sketch design in my blog:
> http://dpldocs.info/this-week-in-d/Blog.Posted_2022_10_31.html
> It is more like bounds checking than a new type. Sure, I do propose a new type, 
> but just to locally bypass the thing, not as something mandatory. With a 
> compiler switch, you can turn it on or off to experiment with different strategies.

Thanks for doing that. Now, if someone wants to implement it ...


More information about the Digitalmars-d mailing list