Commit 2e5f2bae authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

cut google-perftools spin-lock from small-locks bench

Summary: To avoid the extra and unusual dependency in this particular case.

Differential Revision: D27933052

fbshipit-source-id: aeda0b7b5916c3fe05581f9880472d194412c461
parent db330e7c
......@@ -23,8 +23,6 @@
#include <thread>
#include <vector>
#include <google/base/spinlock.h>
#include <folly/Benchmark.h>
#include <folly/SharedMutex.h>
#include <folly/experimental/flat_combining/FlatCombining.h>
......@@ -83,15 +81,6 @@ class InitLock {
void unlock() { lock_.unlock(); }
};
class GoogleSpinLockAdapter {
public:
void lock() { lock_.Lock(); }
void unlock() { lock_.Unlock(); }
private:
SpinLock lock_;
};
class DistributedMutexFlatCombining {
public:
folly::DistributedMutex mutex_;
......@@ -402,10 +391,6 @@ BENCHMARK(StdMutexUncontendedBenchmark, iters) {
runUncontended<std::mutex>(iters);
}
BENCHMARK(GoogleSpinUncontendedBenchmark, iters) {
runUncontended<GoogleSpinLockAdapter>(iters);
}
BENCHMARK(MicroSpinLockUncontendedBenchmark, iters) {
runUncontended<InitLock<folly::MicroSpinLock>>(iters);
}
......@@ -466,9 +451,6 @@ BENCHMARK_DRAW_LINE();
static void std_mutex(size_t numOps, size_t numThreads) {
runContended<std::mutex>(numOps, numThreads);
}
static void google_spin(size_t numOps, size_t numThreads) {
runContended<GoogleSpinLockAdapter>(numOps, numThreads);
}
static void folly_microspin(size_t numOps, size_t numThreads) {
runContended<InitLock<folly::MicroSpinLock>>(numOps, numThreads);
}
......@@ -497,9 +479,6 @@ static void folly_flatcombining_caching(size_t numOps, size_t numThreads) {
static void std_mutex_simple(size_t numOps, size_t numThreads) {
runContended<std::mutex, Ints>(numOps, numThreads, 0);
}
static void google_spin_simple(size_t numOps, size_t numThreads) {
runContended<GoogleSpinLockAdapter, Ints>(numOps, numThreads, 0);
}
static void folly_microspin_simple(size_t numOps, size_t numThreads) {
runContended<InitLock<folly::MicroSpinLock>, Ints>(numOps, numThreads, 0);
}
......@@ -537,7 +516,6 @@ static void folly_flatcombining_caching_simple(size_t ops, size_t threads) {
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 1thread, 1)
BENCH_REL(google_spin, 1thread, 1)
BENCH_REL(folly_microspin, 1thread, 1)
BENCH_REL(folly_picospin, 1thread, 1)
BENCH_REL(folly_microlock, 1thread, 1)
......@@ -548,7 +526,6 @@ BENCH_REL(folly_flatcombining_no_caching, 1thread, 1)
BENCH_REL(folly_flatcombining_caching, 1thread, 1)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 2thread, 2)
BENCH_REL(google_spin, 2thread, 2)
BENCH_REL(folly_microspin, 2thread, 2)
BENCH_REL(folly_picospin, 2thread, 2)
BENCH_REL(folly_microlock, 2thread, 2)
......@@ -559,7 +536,6 @@ BENCH_REL(folly_flatcombining_no_caching, 2thread, 2)
BENCH_REL(folly_flatcombining_caching, 2thread, 2)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 4thread, 4)
BENCH_REL(google_spin, 4thread, 4)
BENCH_REL(folly_microspin, 4thread, 4)
BENCH_REL(folly_picospin, 4thread, 4)
BENCH_REL(folly_microlock, 4thread, 4)
......@@ -570,7 +546,6 @@ BENCH_REL(folly_flatcombining_no_caching, 4thread, 4)
BENCH_REL(folly_flatcombining_caching, 4thread, 4)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 8thread, 8)
BENCH_REL(google_spin, 8thread, 8)
BENCH_REL(folly_microspin, 8thread, 8)
BENCH_REL(folly_picospin, 8thread, 8)
BENCH_REL(folly_microlock, 8thread, 8)
......@@ -581,7 +556,6 @@ BENCH_REL(folly_flatcombining_no_caching, 8thread, 8)
BENCH_REL(folly_flatcombining_caching, 8thread, 8)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 16thread, 16)
BENCH_REL(google_spin, 16thread, 16)
BENCH_REL(folly_microspin, 16thread, 16)
BENCH_REL(folly_picospin, 16thread, 16)
BENCH_REL(folly_microlock, 16thread, 16)
......@@ -592,7 +566,6 @@ BENCH_REL(folly_flatcombining_no_caching, 16thread, 16)
BENCH_REL(folly_flatcombining_caching, 16thread, 16)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 32thread, 32)
BENCH_REL(google_spin, 32thread, 32)
BENCH_REL(folly_microspin, 32thread, 32)
BENCH_REL(folly_picospin, 32thread, 32)
BENCH_REL(folly_microlock, 32thread, 32)
......@@ -603,7 +576,6 @@ BENCH_REL(folly_flatcombining_no_caching, 32thread, 32)
BENCH_REL(folly_flatcombining_caching, 32thread, 32)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 64thread, 64)
BENCH_REL(google_spin, 64thread, 64)
BENCH_REL(folly_microspin, 64thread, 64)
BENCH_REL(folly_picospin, 64thread, 64)
BENCH_REL(folly_microlock, 64thread, 64)
......@@ -614,7 +586,6 @@ BENCH_REL(folly_flatcombining_no_caching, 64thread, 64)
BENCH_REL(folly_flatcombining_caching, 64thread, 64)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex, 128thread, 128)
BENCH_REL(google_spin, 128thread, 128)
BENCH_REL(folly_microspin, 128thread, 128)
BENCH_REL(folly_picospin, 128thread, 128)
BENCH_REL(folly_microlock, 128thread, 128)
......@@ -626,7 +597,6 @@ BENCH_REL(folly_flatcombining_caching, 128thread, 128)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 1thread, 1)
BENCH_REL(google_spin_simple, 1thread, 1)
BENCH_REL(folly_microspin_simple, 1thread, 1)
BENCH_REL(folly_picospin_simple, 1thread, 1)
BENCH_REL(folly_microlock_simple, 1thread, 1)
......@@ -640,7 +610,6 @@ BENCH_REL(atomic_fetch_xor, 1thread, 1)
BENCH_REL(atomic_cas, 1thread, 1)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 2thread, 2)
BENCH_REL(google_spin_simple, 2thread, 2)
BENCH_REL(folly_microspin_simple, 2thread, 2)
BENCH_REL(folly_picospin_simple, 2thread, 2)
BENCH_REL(folly_microlock_simple, 2thread, 2)
......@@ -654,7 +623,6 @@ BENCH_REL(atomic_fetch_xor, 2thread, 2)
BENCH_REL(atomic_cas, 2thread, 2)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 4thread, 4)
BENCH_REL(google_spin_simple, 4thread, 4)
BENCH_REL(folly_microspin_simple, 4thread, 4)
BENCH_REL(folly_picospin_simple, 4thread, 4)
BENCH_REL(folly_microlock_simple, 4thread, 4)
......@@ -668,7 +636,6 @@ BENCH_REL(atomic_fetch_xor, 4thread, 4)
BENCH_REL(atomic_cas, 4thread, 4)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 8thread, 8)
BENCH_REL(google_spin_simple, 8thread, 8)
BENCH_REL(folly_microspin_simple, 8thread, 8)
BENCH_REL(folly_picospin_simple, 8thread, 8)
BENCH_REL(folly_microlock_simple, 8thread, 8)
......@@ -682,7 +649,6 @@ BENCH_REL(atomic_fetch_xor, 8thread, 8)
BENCH_REL(atomic_cas, 8thread, 8)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 16thread, 16)
BENCH_REL(google_spin_simple, 16thread, 16)
BENCH_REL(folly_microspin_simple, 16thread, 16)
BENCH_REL(folly_picospin_simple, 16thread, 16)
BENCH_REL(folly_microlock_simple, 16thread, 16)
......@@ -696,7 +662,6 @@ BENCH_REL(atomic_fetch_xor, 16thread, 16)
BENCH_REL(atomic_cas, 16thread, 16)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 32thread, 32)
BENCH_REL(google_spin_simple, 32thread, 32)
BENCH_REL(folly_microspin_simple, 32thread, 32)
BENCH_REL(folly_picospin_simple, 32thread, 32)
BENCH_REL(folly_microlock_simple, 32thread, 32)
......@@ -710,7 +675,6 @@ BENCH_REL(atomic_fetch_xor, 32thread, 32)
BENCH_REL(atomic_cas, 32thread, 32)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 64thread, 64)
BENCH_REL(google_spin_simple, 64thread, 64)
BENCH_REL(folly_microspin_simple, 64thread, 64)
BENCH_REL(folly_picospin_simple, 64thread, 64)
BENCH_REL(folly_microlock_simple, 64thread, 64)
......@@ -724,7 +688,6 @@ BENCH_REL(atomic_fetch_xor, 64thread, 64)
BENCH_REL(atomic_cas, 64thread, 64)
BENCHMARK_DRAW_LINE();
BENCH_BASE(std_mutex_simple, 128thread, 128)
BENCH_REL(google_spin_simple, 128thread, 128)
BENCH_REL(folly_microspin_simple, 128thread, 128)
BENCH_REL(folly_picospin_simple, 128thread, 128)
BENCH_REL(folly_microlock_simple, 128thread, 128)
......@@ -750,7 +713,6 @@ int main(int argc, char** argv) {
if (FLAGS_run_fairness) {
for (auto numThreads : {2, 4, 8, 16, 32, 64}) {
fairnessTest<std::mutex>("std::mutex", numThreads);
fairnessTest<GoogleSpinLockAdapter>("GoogleSpinLock", numThreads);
fairnessTest<InitLock<folly::MicroSpinLock>>(
"folly::MicroSpinLock", numThreads);
fairnessTest<InitLock<folly::PicoSpinLock<std::uint16_t>>>(
......@@ -778,9 +740,6 @@ Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
------- std::mutex 2 threads
Sum: 361854376 Mean: 6461685 stddev: 770837
Lock time stats in us: mean 0 stddev 1 max 63002
------- GoogleSpinLock 2 threads
Sum: 463530598 Mean: 8277332 stddev: 759139
Lock time stats in us: mean 0 stddev 9 max 44995
------- folly::MicroSpinLock 2 threads
Sum: 454928254 Mean: 8123718 stddev: 1568978
Lock time stats in us: mean 0 stddev 9 max 118006
......@@ -803,9 +762,6 @@ Lock time stats in us: mean 0 stddev 1 max 26006
------- std::mutex 4 threads
Sum: 164126417 Mean: 2930828 stddev: 208327
Lock time stats in us: mean 0 stddev 2 max 11759
------- GoogleSpinLock 4 threads
Sum: 200210044 Mean: 3575179 stddev: 472142
Lock time stats in us: mean 0 stddev 21 max 16715
------- folly::MicroSpinLock 4 threads
Sum: 168795789 Mean: 3014210 stddev: 825455
Lock time stats in us: mean 0 stddev 3 max 152163
......@@ -828,9 +784,6 @@ Lock time stats in us: mean 0 stddev 0 max 27008
------- std::mutex 8 threads
Sum: 82709846 Mean: 1476961 stddev: 173483
Lock time stats in us: mean 2 stddev 52 max 9404
------- GoogleSpinLock 8 threads
Sum: 98373671 Mean: 1756672 stddev: 65326
Lock time stats in us: mean 1 stddev 43 max 20805
------- folly::MicroSpinLock 8 threads
Sum: 94805197 Mean: 1692949 stddev: 633249
Lock time stats in us: mean 1 stddev 3 max 104517
......@@ -853,9 +806,6 @@ Lock time stats in us: mean 1 stddev 3 max 25004
------- std::mutex 16 threads
Sum: 36606221 Mean: 653682 stddev: 65154
Lock time stats in us: mean 5 stddev 117 max 13603
------- GoogleSpinLock 16 threads
Sum: 29830088 Mean: 532680 stddev: 19614
Lock time stats in us: mean 7 stddev 2 max 10338
------- folly::MicroSpinLock 16 threads
Sum: 27935153 Mean: 498842 stddev: 197304
Lock time stats in us: mean 7 stddev 3 max 257433
......@@ -878,9 +828,6 @@ Lock time stats in us: mean 2 stddev 3 max 32005
------- std::mutex 32 threads
Sum: 10307832 Mean: 184068 stddev: 2431
Lock time stats in us: mean 21 stddev 416 max 18397
------- GoogleSpinLock 32 threads
Sum: 10911809 Mean: 194853 stddev: 2968
Lock time stats in us: mean 20 stddev 393 max 10765
------- folly::MicroSpinLock 32 threads
Sum: 7318139 Mean: 130681 stddev: 24742
Lock time stats in us: mean 29 stddev 586 max 230672
......@@ -903,9 +850,6 @@ Lock time stats in us: mean 8 stddev 177 max 35008
------- std::mutex 64 threads
Sum: 10656640 Mean: 166510 stddev: 3340
Lock time stats in us: mean 23 stddev 402 max 10797
------- GoogleSpinLock 64 threads
Sum: 11263029 Mean: 175984 stddev: 4669
Lock time stats in us: mean 22 stddev 381 max 26844
------- folly::MicroSpinLock 64 threads
Sum: 23284721 Mean: 363823 stddev: 62670
Lock time stats in us: mean 10 stddev 184 max 168470
......@@ -929,7 +873,6 @@ Lock time stats in us: mean 10 stddev 179 max 62008
folly/synchronization/test/SmallLocksBenchmark.cpprelative time/iter iters/s
============================================================================
StdMutexUncontendedBenchmark 16.42ns 60.90M
GoogleSpinUncontendedBenchmark 11.25ns 88.86M
MicroSpinLockUncontendedBenchmark 10.95ns 91.33M
PicoSpinLockUncontendedBenchmark 20.38ns 49.07M
MicroLockUncontendedBenchmark 28.92ns 34.58M
......@@ -939,7 +882,6 @@ AtomicFetchAddUncontendedBenchmark 5.47ns 182.91M
----------------------------------------------------------------------------
----------------------------------------------------------------------------
std_mutex(1thread) 900.28ns 1.11M
google_spin(1thread) 94.91% 948.60ns 1.05M
folly_microspin(1thread) 109.53% 821.97ns 1.22M
folly_picospin(1thread) 101.86% 883.88ns 1.13M
folly_microlock(1thread) 102.54% 878.02ns 1.14M
......@@ -950,7 +892,6 @@ folly_flatcombining_no_caching(1thread) 106.73% 843.49ns 1.19M
folly_flatcombining_caching(1thread) 125.22% 718.96ns 1.39M
----------------------------------------------------------------------------
std_mutex(2thread) 1.27us 784.90K
google_spin(2thread) 126.84% 1.00us 995.55K
folly_microspin(2thread) 147.93% 861.24ns 1.16M
folly_picospin(2thread) 146.10% 872.06ns 1.15M
folly_microlock(2thread) 131.35% 970.00ns 1.03M
......@@ -961,7 +902,6 @@ folly_flatcombining_no_caching(2thread) 85.64% 1.49us 672.22K
folly_flatcombining_caching(2thread) 91.98% 1.39us 721.93K
----------------------------------------------------------------------------
std_mutex(4thread) 2.40us 417.44K
google_spin(4thread) 111.99% 2.14us 467.49K
folly_microspin(4thread) 101.55% 2.36us 423.92K
folly_picospin(4thread) 97.89% 2.45us 408.64K
folly_microlock(4thread) 79.64% 3.01us 332.45K
......@@ -972,7 +912,6 @@ folly_flatcombining_no_caching(4thread) 91.79% 2.61us 383.17K
folly_flatcombining_caching(4thread) 103.95% 2.30us 433.95K
----------------------------------------------------------------------------
std_mutex(8thread) 4.85us 206.37K
google_spin(8thread) 111.05% 4.36us 229.18K
folly_microspin(8thread) 105.28% 4.60us 217.28K
folly_picospin(8thread) 89.06% 5.44us 183.80K
folly_microlock(8thread) 73.95% 6.55us 152.62K
......@@ -983,7 +922,6 @@ folly_flatcombining_no_caching(8thread) 141.99% 3.41us 293.02K
folly_flatcombining_caching(8thread) 166.26% 2.91us 343.12K
----------------------------------------------------------------------------
std_mutex(16thread) 11.36us 88.01K
google_spin(16thread) 99.95% 11.37us 87.96K
folly_microspin(16thread) 102.73% 11.06us 90.42K
folly_picospin(16thread) 44.00% 25.83us 38.72K
folly_microlock(16thread) 52.42% 21.67us 46.14K
......@@ -994,7 +932,6 @@ folly_flatcombining_no_caching(16thread) 218.07% 5.21us 191.92K
folly_flatcombining_caching(16thread) 217.69% 5.22us 191.58K
----------------------------------------------------------------------------
std_mutex(32thread) 32.12us 31.13K
google_spin(32thread) 115.23% 27.88us 35.87K
folly_microspin(32thread) 104.52% 30.74us 32.54K
folly_picospin(32thread) 32.81% 97.91us 10.21K
folly_microlock(32thread) 57.40% 55.96us 17.87K
......@@ -1005,7 +942,6 @@ folly_flatcombining_no_caching(32thread) 216.41% 14.84us 67.37K
folly_flatcombining_caching(32thread) 261.99% 12.26us 81.56K
----------------------------------------------------------------------------
std_mutex(64thread) 36.76us 27.20K
google_spin(64thread) 115.38% 31.86us 31.39K
folly_microspin(64thread) 112.14% 32.78us 30.51K
folly_picospin(64thread) 32.34% 113.65us 8.80K
folly_microlock(64thread) 57.21% 64.26us 15.56K
......@@ -1016,7 +952,6 @@ folly_flatcombining_no_caching(64thread) 211.85% 17.35us 57.63K
folly_flatcombining_caching(64thread) 241.45% 15.22us 65.68K
----------------------------------------------------------------------------
std_mutex(128thread) 73.05us 13.69K
google_spin(128thread) 116.19% 62.87us 15.91K
folly_microspin(128thread) 97.45% 74.96us 13.34K
folly_picospin(128thread) 31.46% 232.19us 4.31K
folly_microlock(128thread) 56.50% 129.29us 7.73K
......@@ -1027,7 +962,6 @@ folly_flatcombining_no_caching(128thread) 179.10% 40.79us 24.52K
folly_flatcombining_caching(128thread) 189.64% 38.52us 25.96K
----------------------------------------------------------------------------
std_mutex_simple(1thread) 666.33ns 1.50M
google_spin_simple(1thread) 110.03% 605.58ns 1.65M
folly_microspin_simple(1thread) 109.80% 606.87ns 1.65M
folly_picospin_simple(1thread) 108.89% 611.94ns 1.63M
folly_microlock_simple(1thread) 108.42% 614.59ns 1.63M
......@@ -1041,7 +975,6 @@ atomic_fetch_xor(1thread) 110.52% 602.90ns 1.66M
atomic_cas(1thread) 109.86% 606.52ns 1.65M
----------------------------------------------------------------------------
std_mutex_simple(2thread) 1.19us 841.25K
google_spin_simple(2thread) 107.33% 1.11us 902.89K
folly_microspin_simple(2thread) 130.73% 909.27ns 1.10M
folly_picospin_simple(2thread) 112.39% 1.06us 945.48K
folly_microlock_simple(2thread) 113.89% 1.04us 958.14K
......@@ -1055,7 +988,6 @@ atomic_fetch_xor(2thread) 179.85% 660.93ns 1.51M
atomic_cas(2thread) 179.40% 662.58ns 1.51M
----------------------------------------------------------------------------
std_mutex_simple(4thread) 2.37us 422.81K
google_spin_simple(4thread) 106.35% 2.22us 449.64K
folly_microspin_simple(4thread) 110.42% 2.14us 466.89K
folly_picospin_simple(4thread) 111.77% 2.12us 472.58K
folly_microlock_simple(4thread) 82.17% 2.88us 347.44K
......@@ -1069,7 +1001,6 @@ atomic_fetch_xor(4thread) 323.62% 730.84ns 1.37M
atomic_cas(4thread) 300.43% 787.23ns 1.27M
----------------------------------------------------------------------------
std_mutex_simple(8thread) 5.02us 199.09K
google_spin_simple(8thread) 108.93% 4.61us 216.88K
folly_microspin_simple(8thread) 116.44% 4.31us 231.82K
folly_picospin_simple(8thread) 80.84% 6.21us 160.94K
folly_microlock_simple(8thread) 77.18% 6.51us 153.66K
......@@ -1083,7 +1014,6 @@ atomic_fetch_xor(8thread) 380.66% 1.32us 757.87K
atomic_cas(8thread) 238.04% 2.11us 473.93K
----------------------------------------------------------------------------
std_mutex_simple(16thread) 12.26us 81.59K
google_spin_simple(16thread) 104.37% 11.74us 85.16K
folly_microspin_simple(16thread) 116.32% 10.54us 94.91K
folly_picospin_simple(16thread) 53.67% 22.83us 43.79K
folly_microlock_simple(16thread) 66.39% 18.46us 54.17K
......@@ -1097,7 +1027,6 @@ atomic_fetch_xor(16thread) 489.90% 2.50us 399.72K
atomic_cas(16thread) 232.76% 5.27us 189.91K
----------------------------------------------------------------------------
std_mutex_simple(32thread) 30.28us 33.03K
google_spin_simple(32thread) 106.34% 28.47us 35.12K
folly_microspin_simple(32thread) 102.20% 29.62us 33.76K
folly_picospin_simple(32thread) 31.56% 95.92us 10.43K
folly_microlock_simple(32thread) 53.99% 56.07us 17.83K
......@@ -1111,7 +1040,6 @@ atomic_fetch_xor(32thread) 779.56% 3.88us 257.49K
atomic_cas(32thread) 622.19% 4.87us 205.51K
----------------------------------------------------------------------------
std_mutex_simple(64thread) 34.33us 29.13K
google_spin_simple(64thread) 106.28% 32.30us 30.96K
folly_microspin_simple(64thread) 99.86% 34.37us 29.09K
folly_picospin_simple(64thread) 31.37% 109.42us 9.14K
folly_microlock_simple(64thread) 53.46% 64.21us 15.57K
......@@ -1125,7 +1053,6 @@ atomic_fetch_xor(64thread) 756.48% 4.54us 220.37K
atomic_cas(64thread) 606.85% 5.66us 176.78K
----------------------------------------------------------------------------
std_mutex_simple(128thread) 67.35us 14.85K
google_spin_simple(128thread) 106.30% 63.36us 15.78K
folly_microspin_simple(128thread) 92.58% 72.75us 13.75K
folly_picospin_simple(128thread) 29.87% 225.47us 4.44K
folly_microlock_simple(128thread) 52.52% 128.25us 7.80K
......@@ -1146,7 +1073,6 @@ Intel(R) Xeon(R) D-2191 CPU @ 1.60GHz
folly/synchronization/test/SmallLocksBenchmark.cpprelative time/iter iters/s
============================================================================
StdMutexUncontendedBenchmark 37.65ns 26.56M
GoogleSpinUncontendedBenchmark 21.97ns 45.52M
MicroSpinLockUncontendedBenchmark 21.97ns 45.53M
PicoSpinLockUncontendedBenchmark 40.80ns 24.51M
MicroLockUncontendedBenchmark 57.76ns 17.31M
......@@ -1156,7 +1082,6 @@ AtomicFetchAddUncontendedBenchmark 10.67ns 93.73M
----------------------------------------------------------------------------
----------------------------------------------------------------------------
std_mutex(1thread) 1.37us 730.43K
google_spin(1thread) 104.25% 1.31us 761.46K
folly_microspin(1thread) 102.06% 1.34us 745.45K
folly_picospin(1thread) 100.68% 1.36us 735.43K
folly_microlock(1thread) 104.27% 1.31us 761.64K
......@@ -1167,7 +1092,6 @@ folly_flatcombining_no_caching(1thread) 95.44% 1.43us 697.15K
folly_flatcombining_caching(1thread) 99.11% 1.38us 723.94K
----------------------------------------------------------------------------
std_mutex(2thread) 1.65us 605.36K
google_spin(2thread) 111.27% 1.48us 673.61K
folly_microspin(2thread) 119.82% 1.38us 725.35K
folly_picospin(2thread) 112.46% 1.47us 680.81K
folly_microlock(2thread) 106.47% 1.55us 644.54K
......@@ -1178,7 +1102,6 @@ folly_flatcombining_no_caching(2thread) 83.37% 1.98us 504.68K
folly_flatcombining_caching(2thread) 108.62% 1.52us 657.54K
----------------------------------------------------------------------------
std_mutex(4thread) 2.92us 341.96K
google_spin(4thread) 137.67% 2.12us 470.78K
folly_microspin(4thread) 165.47% 1.77us 565.85K
folly_picospin(4thread) 181.92% 1.61us 622.09K
folly_microlock(4thread) 149.83% 1.95us 512.35K
......@@ -1189,7 +1112,6 @@ folly_flatcombining_no_caching(4thread) 88.43% 3.31us 302.40K
folly_flatcombining_caching(4thread) 94.20% 3.10us 322.11K
----------------------------------------------------------------------------
std_mutex(8thread) 7.04us 142.02K
google_spin(8thread) 128.50% 5.48us 182.49K
folly_microspin(8thread) 134.72% 5.23us 191.32K
folly_picospin(8thread) 112.37% 6.27us 159.58K
folly_microlock(8thread) 109.65% 6.42us 155.71K
......@@ -1200,7 +1122,6 @@ folly_flatcombining_no_caching(8thread) 144.99% 4.86us 205.92K
folly_flatcombining_caching(8thread) 156.31% 4.50us 221.99K
----------------------------------------------------------------------------
std_mutex(16thread) 13.08us 76.44K
google_spin(16thread) 121.76% 10.74us 93.07K
folly_microspin(16thread) 91.47% 14.30us 69.92K
folly_picospin(16thread) 67.95% 19.25us 51.94K
folly_microlock(16thread) 73.57% 17.78us 56.24K
......@@ -1211,7 +1132,6 @@ folly_flatcombining_no_caching(16thread) 194.08% 6.74us 148.36K
folly_flatcombining_caching(16thread) 195.03% 6.71us 149.09K
----------------------------------------------------------------------------
std_mutex(32thread) 25.35us 39.45K
google_spin(32thread) 122.73% 20.66us 48.41K
folly_microspin(32thread) 73.81% 34.35us 29.11K
folly_picospin(32thread) 50.66% 50.04us 19.98K
folly_microlock(32thread) 58.40% 43.41us 23.03K
......@@ -1222,7 +1142,6 @@ folly_flatcombining_no_caching(32thread) 257.78% 9.83us 101.68K
folly_flatcombining_caching(32thread) 285.82% 8.87us 112.74K
----------------------------------------------------------------------------
std_mutex(64thread) 45.03us 22.21K
google_spin(64thread) 124.58% 36.15us 27.66K
folly_microspin(64thread) 75.05% 60.00us 16.67K
folly_picospin(64thread) 44.98% 100.12us 9.99K
folly_microlock(64thread) 56.99% 79.01us 12.66K
......@@ -1233,7 +1152,6 @@ folly_flatcombining_no_caching(64thread) 211.67% 21.27us 47.01K
folly_flatcombining_caching(64thread) 222.51% 20.24us 49.41K
----------------------------------------------------------------------------
std_mutex(128thread) 88.78us 11.26K
google_spin(128thread) 125.10% 70.96us 14.09K
folly_microspin(128thread) 71.00% 125.03us 8.00K
folly_picospin(128thread) 30.97% 286.63us 3.49K
folly_microlock(128thread) 54.37% 163.28us 6.12K
......@@ -1244,7 +1162,6 @@ folly_flatcombining_no_caching(128thread) 136.61% 64.99us 15.39K
folly_flatcombining_caching(128thread) 152.32% 58.29us 17.16K
----------------------------------------------------------------------------
std_mutex_simple(1thread) 1.63us 611.75K
google_spin_simple(1thread) 105.70% 1.55us 646.61K
folly_microspin_simple(1thread) 103.24% 1.58us 631.57K
folly_picospin_simple(1thread) 109.17% 1.50us 667.87K
folly_microlock_simple(1thread) 111.22% 1.47us 680.41K
......@@ -1258,7 +1175,6 @@ atomic_fetch_xor(1thread) 106.94% 1.53us 654.23K
atomic_cas(1thread) 124.81% 1.31us 763.52K
----------------------------------------------------------------------------
std_mutex_simple(2thread) 1.60us 626.60K
google_spin_simple(2thread) 96.04% 1.66us 601.80K
folly_microspin_simple(2thread) 111.88% 1.43us 701.02K
folly_picospin_simple(2thread) 106.11% 1.50us 664.91K
folly_microlock_simple(2thread) 88.90% 1.80us 557.04K
......@@ -1272,7 +1188,6 @@ atomic_fetch_xor(2thread) 126.46% 1.26us 792.40K
atomic_cas(2thread) 125.92% 1.27us 788.99K
----------------------------------------------------------------------------
std_mutex_simple(4thread) 2.71us 368.45K
google_spin_simple(4thread) 124.52% 2.18us 458.79K
folly_microspin_simple(4thread) 146.48% 1.85us 539.69K
folly_picospin_simple(4thread) 163.54% 1.66us 602.57K
folly_microlock_simple(4thread) 113.17% 2.40us 416.99K
......@@ -1286,7 +1201,6 @@ atomic_fetch_xor(4thread) 213.14% 1.27us 785.32K
atomic_cas(4thread) 218.93% 1.24us 806.65K
----------------------------------------------------------------------------
std_mutex_simple(8thread) 7.02us 142.50K
google_spin_simple(8thread) 127.47% 5.51us 181.64K
folly_microspin_simple(8thread) 137.77% 5.09us 196.33K
folly_picospin_simple(8thread) 119.78% 5.86us 170.69K
folly_microlock_simple(8thread) 108.08% 6.49us 154.02K
......@@ -1300,7 +1214,6 @@ atomic_fetch_xor(8thread) 505.27% 1.39us 720.02K
atomic_cas(8thread) 389.32% 1.80us 554.79K
----------------------------------------------------------------------------
std_mutex_simple(16thread) 12.78us 78.24K
google_spin_simple(16thread) 122.66% 10.42us 95.96K
folly_microspin_simple(16thread) 98.10% 13.03us 76.75K
folly_picospin_simple(16thread) 72.52% 17.62us 56.74K
folly_microlock_simple(16thread) 70.12% 18.23us 54.86K
......@@ -1314,7 +1227,6 @@ atomic_fetch_xor(16thread) 515.51% 2.48us 403.32K
atomic_cas(16thread) 239.86% 5.33us 187.66K
----------------------------------------------------------------------------
std_mutex_simple(32thread) 23.80us 42.02K
google_spin_simple(32thread) 125.41% 18.98us 52.69K
folly_microspin_simple(32thread) 76.32% 31.18us 32.07K
folly_picospin_simple(32thread) 48.82% 48.75us 20.51K
folly_microlock_simple(32thread) 52.99% 44.92us 22.26K
......@@ -1328,7 +1240,6 @@ atomic_fetch_xor(32thread) 577.90% 4.12us 242.81K
atomic_cas(32thread) 193.87% 12.28us 81.46K
----------------------------------------------------------------------------
std_mutex_simple(64thread) 41.40us 24.16K
google_spin_simple(64thread) 125.42% 33.01us 30.30K
folly_microspin_simple(64thread) 75.30% 54.98us 18.19K
folly_picospin_simple(64thread) 42.87% 96.57us 10.35K
folly_microlock_simple(64thread) 50.88% 81.37us 12.29K
......@@ -1342,7 +1253,6 @@ atomic_fetch_xor(64thread) 551.00% 7.51us 133.10K
atomic_cas(64thread) 183.75% 22.53us 44.39K
----------------------------------------------------------------------------
std_mutex_simple(128thread) 80.97us 12.35K
google_spin_simple(128thread) 124.75% 64.90us 15.41K
folly_microspin_simple(128thread) 70.93% 114.16us 8.76K
folly_picospin_simple(128thread) 32.81% 246.78us 4.05K
folly_microlock_simple(128thread) 48.00% 168.69us 5.93K
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment