Thread overview | ||||||
---|---|---|---|---|---|---|
|
June 05, 2013 Is atomicLoad implemented? | ||||
---|---|---|---|---|
| ||||
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?
--
Marco
|
June 05, 2013 Re: Is atomicLoad implemented? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marco Leise | 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
|
January 01, 2015 Re: Is atomicLoad implemented? | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | Is this because it isn't implemented or because it can be reduced to a no-op on x86 hardware? ________________ dhoom |
January 02, 2015 Re: Is atomicLoad implemented? | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On Wednesday, 5 June 2013 at 17:25:32 UTC, David Nadlinger wrote: > 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 Those who are interested in this topic should watch Herb Sutter's 2012 talk on std::atomic http://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-1-of-2 |
Copyright © 1999-2021 by the D Language Foundation