What is the reason behind Rust’s web framework, Rocket, not performing as well as expected in the Techempower benchmarks?

Great question!

Part of the answer might be this GitHub comment by Rocket’s primary maintainer, especially the second item:

There are three reasons: [why Rocket was not part of the Techempower benchmarks at the time]

  1. I personally believe that developers tend to misplace trust on benchmarks. As such, it might be a good thing that Rocket isn’t on there. Perhaps then the decision of which framework to choose can be based on what’s really important: ergonomics, productivity, security, and correctness.
  2. Rocket doesn’t and won’t ever cater to benchmarks. That is, we won’t make design decisions or changes to Rocket just to be faster at a particular benchmark without further justification.
  3. No one’s written/submitted to TechEmpower.

Of course, it would still be interesting to see what is happening here that makes Rocket less efficient for these particular microbenchmarks w.r.t. other frameworks, especially the other frameworks also written in Rust.

4 Likes