flosse/rust-web-framework-comparison

Add performance benchmark

pickfire opened this issue · 10 comments

Benchmarks can be easily done with the examples that they included in the project source itself.

For most of the frameworks, we could just use (except a few weird crates that name it differently such as hello_world or hello):

git clone git_url
cd git_url
cargo run --example hello-world --release

And then on another terminal:

wrk http://localhost:3000

If we could, we could bump each repository and let them have a standard name hello-world with a standard port to simplifies things in the future. What I learned from benchmarking ~7 different frameworks? I am surprised that actix_web was the fastest even when lower level frameworks (hyper, tokio-tinyhttp, tokio-minihttp) is included and does not have routing.

By the way, it would be great if this was included in http://arewewebyet.org

Feel free to create a script that runs & records the benchmarks :)

frol commented

@mitchtbaum Please, notice that it was the other way around on my laptop: 245k req/s for Thruster vs 208k req/s for Actix-web, but I cannot believe the numbers as Python-based framework Vibora reaches 328k req/s which is complete nonsense! I don't understand what is going on...

@frol Well, python also has japroto which cloud be a lot faster than Vibora since most parts are written in C.

@pickfire @frol @naturallymitchell I'm doing the same thing (mesuring performance) in https://github.com/the-benchmarker/web-frameworks

We could centralize our efforts ❤️

@waghanza There is also https://github.com/TechEmpower/FrameworkBenchmarks which may contains even more

Sure, but a little bit different. In short, my value is to take care of having up-to-date versions of frameworks and languages

We could centralize our efforts heart

👍