RustTokioBenchmark

Simple benchmark comparing tokio mpsc with standard rust one (by eras)

RustTokioBenchmark Alternatives

Similar projects and alternatives to RustTokioBenchmark

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better RustTokioBenchmark alternative or higher similarity.

RustTokioBenchmark reviews and mentions

Posts with mentions or reviews of RustTokioBenchmark. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-26.
  • 3 years of fulltime Rust game development, and why we're leaving Rust behind
    21 projects | news.ycombinator.com | 26 Apr 2024
    > If you ever pull up a debugger and step through an async Rust/tokio codebase, you'll get a good sense for what the overhead here we're talking about is.

    So I didn't quite do that, but the overhead was interesting to me anyway, and as I was unable to find existing benchmarks (surely they exist?), I instructed computer to create one for me: https://github.com/eras/RustTokioBenchmark

    On this wee laptop the numbers are 532 vs 6381 cpu cycles when sending a message (one way) from one async thread to another (tokio) or one kernel thread to another (std::mpsc), when limited to one CPU. (It's limited to one CPU as rdtscp numbers are not comparable between different CPUs; I suppose pinning both threads to their own CPUs and actually measuring end-to-end delay would solve that, but this is what I have now.)

    So this was eye-opening to me, as I expected tokio to be even faster! But still, it's 10x as fast as the thread-based method.. Straight up callback would still be a lot faster, of course, but it will affect the way you structure your code.

    Improvements to methodology accepted via pull requests :).

Stats

Basic RustTokioBenchmark repo stats
1
0
2.7
23 days ago

eras/RustTokioBenchmark is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of RustTokioBenchmark is Rust.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com