-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmutex.txt
More file actions
54 lines (54 loc) · 5.24 KB
/
mutex.txt
File metadata and controls
54 lines (54 loc) · 5.24 KB
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-11T21:44:21+08:00
Running ./bin/mutex
Run on (8 X 2904 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x8)
L1 Instruction 32 KiB (x8)
L2 Unified 256 KiB (x8)
L3 Unified 16384 KiB (x1)
Load Average: 4.18, 4.13, 3.65
----------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------------------------------------------------------------------
benchmark_mutex_lock_unlock<std::mutex>/threads:1 5.00 ns 5.07 ns 139157338
benchmark_mutex_lock_unlock<std::mutex>/threads:8 37.1 ns 154 ns 4704872
benchmark_mutex_lock_unlock<std::shared_mutex>/threads:1 21.2 ns 21.5 ns 31639757
benchmark_mutex_lock_unlock<std::shared_mutex>/threads:8 335 ns 1678 ns 755416
benchmark_mutex_lock_unlock<std::recursive_mutex>/threads:1 16.0 ns 16.2 ns 42295754
benchmark_mutex_lock_unlock<std::recursive_mutex>/threads:8 42.5 ns 177 ns 4265536
benchmark_mutex_lock_unlock<pthread_mutex>/threads:1 12.4 ns 12.5 ns 55359476
benchmark_mutex_lock_unlock<pthread_mutex>/threads:8 32.3 ns 123 ns 4498952
benchmark_mutex_lock_unlock<pthread_mutex_recursive>/threads:1 15.7 ns 15.8 ns 44423413
benchmark_mutex_lock_unlock<pthread_mutex_recursive>/threads:8 43.9 ns 183 ns 4371240
benchmark_mutex_lock_unlock<pthread_mutex_adaptive>/threads:1 13.3 ns 13.3 ns 50962116
benchmark_mutex_lock_unlock<pthread_mutex_adaptive>/threads:8 46.8 ns 201 ns 3872056
benchmark_mutex_lock_unlock<futex_mutex>/threads:1 10.3 ns 10.3 ns 70807841
benchmark_mutex_lock_unlock<futex_mutex>/threads:8 26.3 ns 110 ns 6846192
benchmark_mutex_lock_unlock<spin_to_futex_mutex>/threads:1 8.82 ns 8.83 ns 77338804
benchmark_mutex_lock_unlock<spin_to_futex_mutex>/threads:8 17.1 ns 81.8 ns 8900096
benchmark_mutex_lock_unlock<ticket_spinlock>/threads:1 6.81 ns 6.81 ns 106669908
benchmark_mutex_lock_unlock<ticket_spinlock>/threads:8 454 ns 2305 ns 475488
benchmark_mutex_lock_unlock<ticket_mutex>/threads:1 8.93 ns 8.92 ns 75667214
benchmark_mutex_lock_unlock<ticket_mutex>/threads:8 23637 ns 70278 ns 8000
benchmark_mutex_lock_unlock<semaphore_mutex>/threads:1 15.6 ns 15.6 ns 44714449
benchmark_mutex_lock_unlock<semaphore_mutex>/threads:8 142 ns 614 ns 1121848
benchmark_mutex_lock_unlock<spinlock>/threads:1 7.38 ns 7.37 ns 95029044
benchmark_mutex_lock_unlock<spinlock>/threads:8 41.9 ns 218 ns 3569104
benchmark_mutex_lock_unlock<spinlock_amd>/threads:1 6.99 ns 6.97 ns 87486857
benchmark_mutex_lock_unlock<spinlock_amd>/threads:8 60.9 ns 350 ns 2769176
benchmark_mutex_lock_unlock<spinlock_test_and_set>/threads:1 7.10 ns 7.07 ns 93244374
benchmark_mutex_lock_unlock<spinlock_test_and_set>/threads:8 15.9 ns 88.1 ns 7750424
benchmark_mutex_lock_unlock<spinlock_test_and_set_once>/threads:1 7.08 ns 7.06 ns 97349195
benchmark_mutex_lock_unlock<spinlock_test_and_set_once>/threads:8 11.6 ns 65.3 ns 9823560
benchmark_mutex_lock_unlock<spinlock_compare_exchange>/threads:1 7.06 ns 7.03 ns 94646942
benchmark_mutex_lock_unlock<spinlock_compare_exchange>/threads:8 12.8 ns 76.1 ns 11193744
benchmark_mutex_lock_unlock<spinlock_compare_exchange_only>/threads:1 7.08 ns 7.05 ns 93665789
benchmark_mutex_lock_unlock<spinlock_compare_exchange_only>/threads:8 19.8 ns 115 ns 11199664
benchmark_mutex_lock_unlock<terrible_spinlock>/threads:1 7.41 ns 7.37 ns 94666368
benchmark_mutex_lock_unlock<terrible_spinlock>/threads:8 79.9 ns 486 ns 1292160
benchmark_mutex_lock_unlock<boost::detail::spinlock>/threads:1 7.47 ns 7.43 ns 92099628
benchmark_mutex_lock_unlock<boost::detail::spinlock>/threads:8 6.53 ns 8.99 ns 74885728
benchmark_shared_mutex_lock_shared 15.7 ns 15.6 ns 46548475
benchmark_semaphore_release_and_acquire 16.1 ns 16.0 ns 43786641
benchmark_custom_semaphore_release_and_acquire 34.4 ns 34.2 ns 21520948
benchmark_yield 135 ns 135 ns 5499905