Re: [Capy/Corosio review] Benchmark results

Marcelo Zimbres Silva via Boost <[email protected]> Mon, 29 Jun 2026 23:16:31 +0200
Newsgroups gmane.comp.lib.boost.devel
Message-ID <CAPGXEnGSnAWuJdcKuEW=1MPYQVa1Ysq=qeptUgen0Ov4ct2Xuw@mail.gmail.com>
On Mon, 29 Jun 2026 at 17:47, Christian Mazakas via Boost
<[email protected]> wrote:
> These results seem a little suspicious to me. Rust is 4.62x slower? C, C++
> and Rust are relatively the same perf-wise, because they all just compile
> to LLVM IR and get turned into a final executable by clang.
>
> I've pointed this out before but the version of Tokio being tested is ~20
> versions behind.

I have run the benchmarks again, the raw data follows below. Nothing
seems to have changed.

> I think you should publish the flamegraphs here, because there's something
> wrong if a language that compiles to llvm ir is over 4.5x slower, and this
> is worthy of a little skepticism.
>
> Being 20x faster than Go also sounds kind of suspicious, if I'm being
> honest.
>
> redis-rs sits at around 80 million total downloads (
> https://crates.io/crates/redis) and has numerous contributors.
>
> Something is going on here, and only the flamegraphs can really tell us.

Profiling clients to find out what are their performance bottlenecks
is far beyond scope. I am mostly concerned with making sure my
implementation is correct and uses the client idiomatically.  I invite
you to review it and let me know of any improvement I have missed or
whether anything is wrong. Now to the results

App                   time(s)
-------------------------------------
boost_redis_asio_co   16.61
boost_redis_asio_cb   18.36
boost_redis_corosio    18.30
redis_rs                       30.11
go_redis                      73.16

Info: Measure with /usr/bin/time

App                                %usr    %system    %wait    %CPU
------------------------------------------------------------------------------
boost_redis_asio_co      59.91    2.59            0.00      62.49
boost_redis_asio_cb      45.14    2.61            0.00      47.75
boost_redis_corosio       31.33    5.67            0.00      37.00
redis_rs                          98.21      1.65          0.00      99.86
go_redis                       172.37  104.00          0.15    276.37

Info: pidstat -u

App                          threads    fd-nr
-----------------------------------------------
boost_redis_asio_co     2        7
boost_redis_asio_cb     2        7
boost_redis_corosio     3         7
redis_rs                         1       10
go_redis                      24    1004

Info: Measured with pidstat -v

App                              cswch/s    nvcswch/s
-----------------------------------------------------------
boost_redis_asio_co     2728.00     1.28
boost_redis_asio_cb    3086.28      2.78
boost_redis_corosio     3292.11      0.39
redis_rs                            22.55    17.87
go_redis                       3358.07      9.33

Info: Measured with pidstat -w

App                             minflt/s          VSZ        RSS     %MEM
--------------------------------------------------------------------------------
boost_redis_asio_co    65.89         92320      12796    0.04
boost_redis_asio_cb    50.94         91520      11752    0.04
boost_redis_corosio     85.78       101535        9678    0.03
redis_rs                        27.94           7945        6488    0.02
go_redis                       58.56     2955086    285233    0.88

Info: Measured with pidstat -r

App                   cache-misses   branch-misses
-------------------------------------------------------------------
boost_redis_asio_co       2,582,352          95,994,676
boost_redis_asio_cb       1,275,913          55,806,958
boost_redis_corosio        2,104,264          87,184,953
redis_rs                           3,697,919         321,341,140
go_redis                   1,225,923,065      1,677,269,847

Info: perf stat -B -e branch-misses,cache-misses

Marcelo
_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/VM2GWA3LOEFUFU3Y2FL7SHS3SSIALTN2/