What are the worst parts of D?

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 11 06:55:22 PDT 2014


On Saturday, 11 October 2014 at 09:26:28 UTC, Marc Schütz wrote:
> I understand that. My argument is that the same should apply to 
> the entire heap: After you've allocated and released a certain 
> amount of objects via GC.malloc() and GC.free(), the heap will 
> have grown to a size large enough that any subsequent 
> allocations of temporary objects can be satisfied from the 
> existing heap without triggering a collection, so that only the 
> overhead of actual allocation and freeing should be relevant.

But it still requires GC to check its pool state upon each 
request and make relevant adjustments for malloc/free combo. For 
something like a hundred of temporary allocations per request it 
accumulates into notable time (and milliseconds matter). In 
absence of collection it is cheap enough to not care about single 
malloc call on its own but still not cheap enough to ignore costs 
of many calls.

You have interested me in doing some related benchmarks though.


More information about the Digitalmars-d mailing list