Optimize MicroSpinLock for the unlocked case
Summary: MicroSpinLock was doing a non-relaxed load before cas, which seems odd because typically we expect spin locks to be unlocked. This diff flips the order and assumes the lock is unlocked before doing a load-loop. While the benchmark results for SmallLocksBenchmark are a little mixed, the results in a more real world use case in stats/DigestBuilderBenchmark show that this is a real winner. Reviewed By: djwatson Differential Revision: D7828158 fbshipit-source-id: e195b9739ce931a67a39ffb9715a228aef59f6bc
Showing
Please register or sign in to comment