The GC and performance, but not what you expect

Rainer Schuetze via Digitalmars-d digitalmars-d at puremagic.com
Fri May 30 01:29:58 PDT 2014



On 29.05.2014 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.
>

A lock should not be more than a CAS operation that always succeeds in a 
single threaded application, but OS overhead might be considerable.

Adam Sakareassen has recently announced a rewrite of the GC that has 
lock-free allocations: 
http://forum.dlang.org/thread/mailman.655.1399956110.2907.digitalmars-d@puremagic.com

Unfortunately, it isn't available yet...


More information about the Digitalmars-d mailing list