Name Description Size
BUILD.gn 2386
DEPS 177
mutex.h 2235
mutex_abseil.h 1266
mutex_benchmark.cc Results: NB when reproducing: Remember to turn of power management features such as CPU scaling before running! pthreads (Linux): ---------------------------------------------------------------------- Run on (12 X 4500 MHz CPU s) CPU Caches: L1 Data 32 KiB (x6) L1 Instruction 32 KiB (x6) L2 Unified 1024 KiB (x6) L3 Unified 8448 KiB (x1) Load Average: 0.26, 0.28, 0.44 ---------------------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------------------- BM_LockWithMutex/threads:1 13.4 ns 13.4 ns 52192906 BM_LockWithMutex/threads:2 44.2 ns 88.4 ns 8189944 BM_LockWithMutex/threads:4 52.0 ns 198 ns 3743244 BM_LockWithMutex/threads:12 84.9 ns 944 ns 733524 std::mutex performs like the pthread implementation (Linux). Abseil (Linux): ---------------------------------------------------------------------- Run on (12 X 4500 MHz CPU s) CPU Caches: L1 Data 32 KiB (x6) L1 Instruction 32 KiB (x6) L2 Unified 1024 KiB (x6) L3 Unified 8448 KiB (x1) Load Average: 0.27, 0.24, 0.37 ---------------------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------------------- BM_LockWithMutex/threads:1 15.0 ns 15.0 ns 46550231 BM_LockWithMutex/threads:2 91.1 ns 182 ns 4059212 BM_LockWithMutex/threads:4 40.8 ns 131 ns 5496560 BM_LockWithMutex/threads:12 37.0 ns 130 ns 5377668 3121
mutex_critical_section.h 1835
mutex_gn
mutex_pthread.h 3230
mutex_unittest.cc 4773
sequence_checker_internal.cc 3023
sequence_checker_internal.h 3287
sequence_checker_internal_gn
yield.cc 976
yield.h 647
yield_gn
yield_policy.cc 2218
yield_policy.h 1278
yield_policy_gn
yield_policy_unittest.cc 2122