Can D's Garbage Collector be Very Fast?

sarn sarn at theartofmachinery.com
Thu May 9 22:43:33 UTC 2019


On Thursday, 9 May 2019 at 08:20:18 UTC, Per Nordlöw wrote:
> On Wednesday, 8 May 2019 at 22:43:54 UTC, sarn wrote:
>> It was <0.5ms typical, ~1ms max for collections on a dscanner 
>> workload (8GB RAM laptop), but maybe you want to do your own 
>> benchmarks.  Even if you can't use bpftrace to get the full 
>> timing histogram, the built-in GC profiler can easily give you 
>> the max pause time for a D program.  (Read the full post for 
>> details.)
>
> Where these tests run using DMD or LDC?

dscanner was built with DMD (version 2.081, I think).

> It would be very interesting to rerun these tests with DMD 
> 2.087 (or current master), having a GC with a parallel marking 
> phase, when it has been released.

I might do more profiling one day.  Remember: the built-in GC 
profiler requires no setup at all, so if you're interested enough 
to do a quick comparison of worst-case timings, it's very easy to 
just do it.


More information about the Digitalmars-d mailing list