Go vs Rust frameworks: Hello World Performance

Mayank Choubey
Tech Tonic
2 min readMay 29, 2024

--

In this article, we’ll compare 3 Go frameworks (Gin, Fiber, and Rocket) with 3 Rust frameworks (Actix, Axum, Rocket) for a simple hello world case. We already know that, hello world is not a real-world case. Let’s get started.

Test setup

All tests are executed on Macbook Pro M2 with 16G RAM and 8+4 cores. The load testing tool is Bombardier. The Go version is 1.22.3. The Rust version is 1.78.0.

The application code is as follows:

Results

Each test of 100 concurrent connections runs for 10M requests. A warm-up of 1K requests is given.

The results in chart form are as follows:

Analysis

Not a major difference for the simple hello world case. Both Go and Rust frameworks perform very well. The fastest ones are Actix (137K), and Gin (125K). The CPU usage of Rust apps is lower than Go apps. Both have very low memory usage, but Rust’s is even lower.

Winner: Actix (Rust)

Thanks for reading!

--

--