6 ms·
Interesting approach modeling after Go's net/http but in Rust. The handler signature looks clean. Curious about the 2-3x performance claim — is that comparing a
by Zedmor 6mo ago
Interesting approach modeling after Go's net/http but in Rust. The handler signature looks clean. Curious about the 2-3x performance claim — is that comparing against Go's standard library or something like actix/axum? Would love to see the benchmarks.
- apatheticonion 6mo agoHi thanks! My focus was developer ergonomics so it's rewarding to hear some of that has translated across. The benchmark claim is based on a naive, simple "hello world" GET req/response, comparing the Go stdlib vs the equivalent handler using uhttp. I used oha to measure. https://github.com/alshdavid/uhttp/blob/main/benchmarks/go/src/main.go#L9 https://github.com/alshdavid/uhttp/blob/main/benchmarks/go/s... vs https://github.com/alshdavid/uhttp/blob/main/examples/basic/src/main.rs https://github.com/alshdavid/uhttp/blob/main/examples/basic/... Output: https://github.com/alshdavid/uhttp/blob/main/crates/uhttp/README.md#benchmarks https://github.com/alshdavid/uhttp/blob/main/crates/uhttp/RE... Often a meaningless benchmark, but it does serve to measure the overhead from the http library itself. Happy to hear suggestions on the benchmark approach as I don't want to be misleading