Stephan Eberle
Oct 27, 2023

--

The benchmark doesn't demonstrate the same thing in both languages. In Go you implicitly leave out the calling of your handler func and hide all the muxer stuff while in Rust you explicitly call async handlers and have no
muxer to begin with, meaning the Rust code omits costly string pattern matching and answers always with the hello-function while the Go code will only answer when "/" is called. This and the non-GC environment of Rust will almost certainly swing the benchmark in favor of rust.

Also no production-like code is shown. What you demonstrate however is the superior readability of Go. 👌

--

--

Stephan Eberle
Stephan Eberle

Responses (1)