Improve cpu id caching in DigestBuilder
Summary: `DigestBuilder` caches the cpu id and invalidates it when it detects contention, but the critical section is small enough that it is possible for two thread to end up on a conflicting slot but not detect it for some time, causing cache-line pingponging in the meantime. Switch to `cachedCurrent()` instead, which uses the number of accesses to invalidate the cache, and is successfully adopted by other high-concurrency primitives. Reviewed By: yfeldblum Differential Revision: D27726518 fbshipit-source-id: 05d70ad9f101df4a8797e44cc3cbe94cbd1cb7b8
Showing
Please register or sign in to comment