mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 12:07:43 +00:00
Use thread_local compiler specifics
Much faster then pthread_getspecific() but still a speed regression against the original code. Following are the nps on a bench: Position 454165 454838 455433 tls 441046 442767 442767 ms (Win) 450521 447510 451105 ms (pthread) 422115 422115 424276 Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -64,6 +64,12 @@
|
||||
# define FORCE_INLINE inline
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# define THREAD_LOCAL __thread
|
||||
#else
|
||||
# define THREAD_LOCAL __declspec(thread)
|
||||
#endif
|
||||
|
||||
#if defined(USE_POPCNT)
|
||||
const bool HasPopCnt = true;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user