The GC and performance, but not what you expect

Robert Schadek via Digitalmars-d digitalmars-d at puremagic.com
Thu May 29 04:01:48 PDT 2014


On 05/29/2014 12:41 PM, Jacob Carlborg via Digitalmars-d wrote:
> On 2014-05-29 12:09, Atila Neves wrote:
>
>> The GC is preventing me from beating Java, but not because of
>> collections. It's the locking it does to allocate instead! I
>> don't know about the rest of you but I definitely didn't see that
>> one coming.
>
> Doesn't the runtime know how many threads currently exist? If it's
> only one, could the GC avoid the locking?
>
properly, but collections is not atomar and you have to prevent threads
that are created during collection from collecting. so you still need to
lock


More information about the Digitalmars-d mailing list