Please someone correct my code or something, because I am highly disappointed in Rust. Don’t shoot the messenger here either (feel free to shoot me if its my bad codes fault though).
I know nearly every performance comparison between Go and Rust shows Rust performing better, but does it always? It doesn’t seem to, and in fact the results I’m going to share are pretty poor performance from Rust and with all the hype I’m highly disappointed.
The results from Go — ran with go build && ./go_test
wrk -t 25 -c 100 -d 60s --timeout 8s http://127.0.0.1:8080/test_top25
Running 1m test @ http://127.0.0.1:8080/test_top25
25 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.37s 399.13ms 4.75s 81.81%
Req/Sec 2.76 3.37 30.00 86.68%
2474 requests in 1.00m, 378.22MB read
Requests/sec: 41.18
Transfer/sec: 6.30MB
The results from Rust — ran with cargo run --release
wrk -t 25 -c 100 -d 60s --timeout 8s http://127.0.0.1:8000/test_top25
Running 1m test @ http://127.0.0.1:8000/test_top25
25 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.30s 560.20ms 6.08s 76.31%
Req/Sec 2.75 3.88 30.00 84.61%
1769 requests in 1.00m, 272.14MB read
Requests/sec: 29.43…