-
Notifications
You must be signed in to change notification settings - Fork 0
/
mutex.txt
54 lines (54 loc) · 5.29 KB
/
mutex.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
2023-06-16T17:32:03+08:00
Running ./bin/mutex
Run on (16 X 3417.59 MHz CPU s)
CPU Caches:
L1 Data 48 KiB (x16)
L1 Instruction 32 KiB (x16)
L2 Unified 2048 KiB (x16)
L3 Unified 30720 KiB (x1)
Load Average: 2.89, 1.70, 1.10
-----------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
-----------------------------------------------------------------------------------------------------------------
benchmark_mutex_lock_unlock<std::mutex>/threads:1 2.10 ns 2.10 ns 332166182
benchmark_mutex_lock_unlock<std::mutex>/threads:16 86.1 ns 1017 ns 676592
benchmark_mutex_lock_unlock<std::shared_mutex>/threads:1 15.1 ns 15.1 ns 44861331
benchmark_mutex_lock_unlock<std::shared_mutex>/threads:16 131 ns 1747 ns 497440
benchmark_mutex_lock_unlock<std::recursive_mutex>/threads:1 10.2 ns 10.2 ns 67967532
benchmark_mutex_lock_unlock<std::recursive_mutex>/threads:16 55.2 ns 669 ns 3884032
benchmark_mutex_lock_unlock<pthread_mutex>/threads:1 10.0 ns 10.0 ns 70229087
benchmark_mutex_lock_unlock<pthread_mutex>/threads:16 166 ns 2145 ns 1600000
benchmark_mutex_lock_unlock<pthread_mutex_recursive>/threads:1 10.2 ns 10.2 ns 68335098
benchmark_mutex_lock_unlock<pthread_mutex_recursive>/threads:16 132 ns 1708 ns 734864
benchmark_mutex_lock_unlock<pthread_mutex_adaptive>/threads:1 10.0 ns 10.0 ns 70058826
benchmark_mutex_lock_unlock<pthread_mutex_adaptive>/threads:16 64.5 ns 715 ns 1629616
benchmark_mutex_lock_unlock<futex_mutex>/threads:1 8.47 ns 8.47 ns 83213571
benchmark_mutex_lock_unlock<futex_mutex>/threads:16 59.6 ns 660 ns 1600000
benchmark_mutex_lock_unlock<spin_to_futex_mutex>/threads:1 8.78 ns 8.78 ns 63404526
benchmark_mutex_lock_unlock<spin_to_futex_mutex>/threads:16 81.1 ns 954 ns 1600000
benchmark_mutex_lock_unlock<ticket_spinlock>/threads:1 4.79 ns 4.79 ns 145695491
benchmark_mutex_lock_unlock<ticket_spinlock>/threads:16 1597 ns 20733 ns 112560
benchmark_mutex_lock_unlock<ticket_mutex>/threads:1 7.07 ns 7.07 ns 98870355
benchmark_mutex_lock_unlock<ticket_mutex>/threads:16 96489 ns 408893 ns 16000
benchmark_mutex_lock_unlock<semaphore_mutex>/threads:1 12.9 ns 12.9 ns 54335668
benchmark_mutex_lock_unlock<semaphore_mutex>/threads:16 28.0 ns 307 ns 2195680
benchmark_mutex_lock_unlock<spinlock>/threads:1 5.05 ns 5.05 ns 142940116
benchmark_mutex_lock_unlock<spinlock>/threads:16 39.4 ns 501 ns 2127760
benchmark_mutex_lock_unlock<spinlock_amd>/threads:1 5.21 ns 5.21 ns 134436855
benchmark_mutex_lock_unlock<spinlock_amd>/threads:16 26.4 ns 382 ns 2507296
benchmark_mutex_lock_unlock<spinlock_test_and_set>/threads:1 4.78 ns 4.78 ns 144784518
benchmark_mutex_lock_unlock<spinlock_test_and_set>/threads:16 25.8 ns 369 ns 1600000
benchmark_mutex_lock_unlock<spinlock_test_and_set_once>/threads:1 4.78 ns 4.78 ns 146234767
benchmark_mutex_lock_unlock<spinlock_test_and_set_once>/threads:16 41.4 ns 521 ns 10742960
benchmark_mutex_lock_unlock<spinlock_compare_exchange>/threads:1 5.19 ns 5.19 ns 134967848
benchmark_mutex_lock_unlock<spinlock_compare_exchange>/threads:16 31.8 ns 455 ns 4400096
benchmark_mutex_lock_unlock<spinlock_compare_exchange_only>/threads:1 5.19 ns 5.19 ns 134686284
benchmark_mutex_lock_unlock<spinlock_compare_exchange_only>/threads:16 31.7 ns 472 ns 1600000
benchmark_mutex_lock_unlock<terrible_spinlock>/threads:1 4.78 ns 4.78 ns 146740171
benchmark_mutex_lock_unlock<terrible_spinlock>/threads:16 26.0 ns 395 ns 1600000
benchmark_mutex_lock_unlock<boost::detail::spinlock>/threads:1 4.78 ns 4.78 ns 146319013
benchmark_mutex_lock_unlock<boost::detail::spinlock>/threads:16 5.92 ns 9.52 ns 117865456
benchmark_shared_mutex_lock_shared 12.0 ns 12.0 ns 58534091
benchmark_semaphore_release_and_acquire 12.6 ns 12.6 ns 55519770
benchmark_custom_semaphore_release_and_acquire 19.7 ns 19.7 ns 35431307
benchmark_yield 137 ns 137 ns 5071658