Hacker News new | ask | show | jobs
by Zedmor 72 days 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.
1 comments

Hi 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/s...

vs

https://github.com/alshdavid/uhttp/blob/main/examples/basic/...

Output: 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