Skip to content

Commit 6212fad

Browse files
authored
fiber use std::mutex instead spinlock (#58)
* add doc for bench
1 parent 92e3d76 commit 6212fad

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

bench/readme.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
| IntrusiveThreadPool_task_100000/iterations:10/repeats:5_stddev | 20.8 ms | 5.86 ms| 5 |
1515
| IntrusiveThreadPool_task_100000/iterations:10/repeats:5_cv | 6.50 % | 6.31 % | 5 |
1616

17-
### DistributedPool Task 100,000
17+
### DistributedPool Task 100,000 (spinlock)
1818

1919
| Benchmark | Time | CPU | Iterations |
2020
|---------------------------------------------------------------|--------|---------|------------|
@@ -28,7 +28,21 @@
2828
| DistributedPool_task_100000/iterations:10/repeats:5_stddev | 8.96 ms| 0.477 ms| 5 |
2929
| DistributedPool_task_100000/iterations:10/repeats:5_cv | 7.05 % | 0.80 % | 5 |
3030

31-
### Mutex
31+
### DistributedPool Task 100,000 (std::mutex)
32+
33+
| Benchmark | Time | CPU | Iterations |
34+
|-----------------------------------------------------------------|---------|--------|------------|
35+
| DistributedPool_task_100000/iterations:10/repeats:5 | 254 ms | 96.8 ms| 10 |
36+
| DistributedPool_task_100000/iterations:10/repeats:5 | 492 ms | 196 ms | 10 |
37+
| DistributedPool_task_100000/iterations:10/repeats:5 | 563 ms | 224 ms | 10 |
38+
| DistributedPool_task_100000/iterations:10/repeats:5 | 254 ms | 118 ms | 10 |
39+
| DistributedPool_task_100000/iterations:10/repeats:5 | 175 ms | 83.4 ms| 10 |
40+
| DistributedPool_task_100000/iterations:10/repeats:5_mean | 348 ms | 144 ms | 5 |
41+
| DistributedPool_task_100000/iterations:10/repeats:5_median | 254 ms | 118 ms | 5 |
42+
| DistributedPool_task_100000/iterations:10/repeats:5_stddev | 169 ms | 62.7 ms| 5 |
43+
| DistributedPool_task_100000/iterations:10/repeats:5_cv | 48.67 % | 43.65 %| 5 |
44+
45+
### Compare std::mutex and async_mutex with coro
3246

3347
| Benchmark | Time | CPU | Iterations |
3448
|-----------------------------------------------|----------|---------|------------|

0 commit comments

Comments
 (0)