Testing some singleton implementations

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Feb 5 00:38:37 PST 2014


On 2/4/14, Stanislav Blinov <stanislav.blinov at gmail.com> wrote:
> Both atomicLoad and atomicStore use raw MemoryOrder, and also the
> atomicStore is out of the synchronized {} section:
>
> http://dpaste.dzfl.pl/291abc51bb0e

No difference, but maybe the timing precision isn't proper. It always
displays one of 3/3.25/4 msecs. Anywho what's important is that Atomic
is really speedy and Sync is almost as fast. Except with DMD which is
bad at optimizing this specific code.


More information about the Digitalmars-d mailing list