Files
Stockfish/src
lucasart 00d9e9fd28 Use atomics instead of volatile
Rely on well defined behaviour for message passing, instead of volatile. Three
versions have been tested, to make sure this wouldn't cause a slowdown on any
platform.

v1: Sequentially consistent atomics

No mesurable regression, despite the extra memory barriers on x86. Even with 15
threads and extreme time pressure, both acting as a magnifying glass:

threads=15, tc=2+0.02
ELO: 2.59 +-3.4 (95%) LOS: 93.3%
Total: 18132 W: 4113 L: 3978 D: 10041

threads=7, tc=2+0.02
ELO: -1.64 +-3.6 (95%) LOS: 18.8%
Total: 16914 W: 4053 L: 4133 D: 8728

v2: Acquire/Release semantics

This version generates no extra barriers for x86 (on the hot path). As expected,
no regression either, under the same conditions:

threads=15, tc=2+0.02
ELO: 2.85 +-3.3 (95%) LOS: 95.4%
Total: 19661 W: 4640 L: 4479 D: 10542

threads=7, tc=2+0.02
ELO: 0.23 +-3.5 (95%) LOS: 55.1%
Total: 18108 W: 4326 L: 4314 D: 9468

As suggested by Joona, another test at LTC:

threads=15, tc=20+0.05
ELO: 0.64 +-2.6 (95%) LOS: 68.3%
Total: 20000 W: 3053 L: 3016 D: 13931

v3: Final version: SeqCst/Relaxed

threads=15, tc=10+0.1
ELO: 0.87 +-3.9 (95%) LOS: 67.1%
Total: 9541 W: 1478 L: 1454 D: 6609

Resolves #474
2015-10-25 09:15:45 +00:00
..
2015-09-06 22:19:33 +01:00
2015-10-20 06:58:08 +02:00
2015-04-15 21:21:45 +01:00
2015-08-30 19:58:32 +01:00
2015-06-25 05:29:56 +02:00
2015-01-11 22:56:35 +01:00
2015-03-23 09:02:52 +01:00
2015-10-24 17:29:12 +02:00
2015-10-20 19:49:01 -07:00
2015-10-05 09:13:33 +02:00
2015-10-06 12:35:42 +02:00
2015-10-20 19:49:01 -07:00
2015-03-07 07:38:22 +00:00
2015-10-22 07:03:03 +02:00
2015-03-07 07:38:22 +00:00
2015-10-05 09:13:33 +02:00
2015-03-07 07:38:22 +00:00
2015-10-24 17:29:12 +02:00
2015-10-24 17:29:12 +02:00
2015-10-24 10:08:26 +02:00
2015-10-15 21:27:52 -07:00
2015-08-04 09:51:06 +02:00
2015-05-18 13:54:45 -07:00
2015-10-25 09:15:45 +00:00
2015-10-25 09:15:45 +00:00
2015-03-20 03:05:25 +01:00
2015-10-25 09:15:45 +00:00
2015-10-25 09:15:45 +00:00
2015-10-20 06:58:08 +02:00
2015-10-20 06:58:08 +02:00
2015-09-17 17:33:40 -07:00
2015-10-05 09:16:16 +02:00
2015-10-20 06:58:08 +02:00
2015-04-11 23:24:43 +02:00
2015-10-24 17:29:12 +02:00