dsimcha has done a good work on the GC. After this change I have seen that some 
of my GC-heavy programs are just a bit slower, while most of them are 
significantly faster, so overall it's a good improvement. In my opinion this is 
one of the best things that DMD 2.058 brings (short lambda syntax is another 
one of them, I am appreciating it a lot. Sometimes syntax sugar matters).

Still, even with dsimcha improvements, I think the current D GC is almost a toy 
compared to some of the more advanced GCs that you are able to find around. So 
is it right to work on small (but useful) incremental improvements on the 
current GC, instead of working on creating a fully redesigned D GC (this is a 
large work)? I don't know. But surely even incremental improvements are 
welcome, because there are (or there were) enough low hanging fruits to pick.

I don't know how the current D GC performance scales to heaps of 5 or 30 Gbytes 
size, composed of mostly small objects. From what I've seen this is a hard 
problem even for almost-state-of-the-art GCs.


David Nadlinger:

> The easiest way would be to use a specialized allocator for this – I'm 
> thinking of David Simcha's proposed RegionAllocator (formerly TempAlloc).

I'd like a simple way to define a hierarchy of such allocations (and when you 
free a node of the tree, the whole sub-tree gets deallocated).

Bye,
bearophile

Reply via email to