On Sunday, 2 August 2015 at 06:25:34 UTC, thedeemon wrote:
On Sunday, 2 August 2015 at 05:03:34 UTC, rsw0x wrote:
Furthermore, more often than not allocations in D on the heap
contain no pointers/references at all (>60% of all allocated
memory in nearly every D program I tested that wasn't
optimized to not use the GC contained no pointers/references.)
and AFAIK the current GC makes no use of this fact.
Of course it does: memory allocated for data without pointers
is not scanned (see core.memory.BlkAttr.NO_SCAN). It has been
this way for ages.
Partially correct.
If you compare the amount of memory allocated by the GC that is
marked NO_SCAN compared to passing precise type information with
the allocation many, many allocations that are without
pointers/references are not marked NO_SCAN.