What are the worst parts of D?
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 9 10:29:00 PDT 2014
On Thursday, 9 October 2014 at 16:22:52 UTC, Andrei Alexandrescu
wrote:
>>> To clarify: calling GC.free does remove the root, correct?
>>
>> Not before it creates one. When I mean "avoid creating new GC
>> roots" I
>> mean "no GC activity at all other than extending existing
>> chunks"
>
> That's interesting. So GC.malloc followed by GC.free does
> actually affect things negatively?
Yes and quite notably so as GC.malloc can potentially trigger
collection. With concurrent GC collection is not a disaster but
it still affects the latency and should be avoided.
> Also let's note that extending existing chunks may result in
> new allocations.
Yes. But as those chunks never get free'd it comes to O(1)
allocation count over process lifetime with most allocations
happening during program startup / warmup.
Don has mentioned this as one of important points during his
DConf 2014 talk but it probably didn't catch as much attention as
it should.
More information about the Digitalmars-d
mailing list