@@ -69,31 +69,14 @@ Main APIs include:
69
69
70
70
## Performance
71
71
72
- The following performance tests were conducted on a lightweight server with 2 CPU cores and 4GB RAM:
73
-
74
- - ** tokio-mpmc** :
75
- - Queue size: 1,000,000
76
- - Producers: 4
77
- - Consumers: 4
78
- - Performance test finished in: 318.360935ms
79
-
80
- - ** tokio::sync::mpsc** :
81
- - Queue size: 1,000,000
82
- - Producers: 4
83
- - Consumers: 1
84
- - Performance test finished in: 987.390354ms
85
-
86
- - ** tokio-mpmc IO** :
87
- - Queue size: 1,000,000
88
- - Producers: 4
89
- - Consumers: 4
90
- - IO performance test finished in: 4.495057117s
91
-
92
- - ** tokio::sync::mpsc IO** :
93
- - Queue size: 1,000,000
94
- - Producers: 4
95
- - Consumers: 1
96
- - IO performance test finished in: 7.671314196s
72
+ The performance tests were conducted on a lightweight server with 2 CPU cores and 4GB RAM, using a queue size of 1,000,000.
73
+
74
+ | Implementation | Producers | Consumers | Completion Time |
75
+ | ----------------| -----------| -----------| -----------------|
76
+ | ** tokio-mpmc** | 4 | 4 | 318.360935ms |
77
+ | ** tokio::sync::mpsc** | 4 | 1 | 987.390354ms |
78
+ | ** tokio-mpmc IO** | 4 | 4 | 4.495057117s |
79
+ | ** tokio::sync::mpsc IO** | 4 | 1 | 7.671314196s |
97
80
98
81
These results demonstrate the efficiency of tokio-mpmc in handling multiple producers and consumers compared to tokio::sync::mpsc.
99
82
0 commit comments