Is atomicLoad implemented?

David Nadlinger code at klickverbot.at
Wed Jun 5 10:25:15 PDT 2013


On 5 Jun 2013, at 19:19, Marco Leise wrote:
> I was just experimenting with core.atomic and noticed only a
> marginal speed difference when accessing variables using
> atomicLoad.
> Is this because it isn't implemented or because it can be
> reduced to a no-op on x86 hardware?

atomicLoad/atomicStore are implemented for LDC.

As for what causes the speed difference, the only sensible answer is to 
have a look at the produced assembly. atomicLoad can't be transformed 
into a normal load in the general case even on x86.

David


More information about the digitalmars-d-ldc mailing list