cppcoro icon indicating copy to clipboard operation
cppcoro copied to clipboard

FYI: The fastest C++ coroutine library by the year of 2022

Open beef9999 opened this issue 3 years ago • 0 comments

https://github.com/alibaba/PhotonLibOS

Compare TCP echo server performance, in descending order.

Client Mode: Streaming

Concurrency Model Buffer Size Conn Num QPS Bandwidth CPU util
Photon Stackful coroutine 512 Bytes 4 1604K 6.12Gb 99%
cocoyaxi Stackful coroutine 512 Bytes 4 1545K 5.89Gb 99%
Rust tokio Rust coroutine 512 Bytes 4 1384K 5.28Gb 98%
Go Goroutine 512 Bytes 4 1083K 4.13Gb 100%
libgo Stackful coroutine 512 Bytes 4 770K 2.94Gb 99%
boost::asio Async + Callback 512 Bytes 4 634K 2.42Gb 97%
libco Stackful coroutine 512 Bytes 4 432K 1.65Gb 96%
zab C++20 stackless coroutine 512 Bytes 4 412K 1.57Gb 99%
asyncio C++20 stackless coroutine 512 Bytes 4 163K 0.60Gb 98%

Client Mode: Ping-pong

Concurrency Model Buffer Size Conn Num QPS Bandwidth CPU util
Photon Stackful coroutine 512 Bytes 1000 412K 1.57Gb 100%
boost::asio Async + Callback 512 Bytes 1000 393K 1.49Gb 100%
Rust tokio Rust coroutine 512 Bytes 1000 365K 1.39Gb 100%
Go Goroutine 512 Bytes 1000 331K 1.26Gb 100%
zab C++20 stackless coroutine 512 Bytes 1000 317K 1.21Gb 100%
cocoyaxi Stackful coroutine 512 Bytes 1000 279K 1.06Gb 98%
libco Stackful coroutine 512 Bytes 1000 260K 0.99Gb 96%
libgo Stackful coroutine 512 Bytes 1000 258K 0.98Gb 156%
asyncio C++20 stackless coroutine 512 Bytes 1000 142K 0.54Gb 99%

beef9999 avatar Jun 12 '22 08:06 beef9999