Hacker News new | ask | show | jobs
by mtrpcic 1253 days ago
This is funny, because often times as soon as you add benchmarks, the masses will scream that the benchmarks aren't useful because they don't test real world conditions (global network latency, wide ranges of queries with effectively random patterns, etc.). Benchmarks feel a bit like a "damned if you do, damned if you don't" situation. That said, I love me a good benchmark.
2 comments

There is even a comment on this page saying requests per second isn't everything. So even if you don't benchmark they will still say that benchmarks aren't useful.

Of course I agree that benchmarks can't tell the whole story, but they can demonstrate huge differences in potential performance which can give you a reason to create a realistic benchmark for your use case.

For my own "fast" projects[1] I've taken to providing benchmarks, but adding a big 'ol caveat at the top describing ways in which the benchmark may not reflect reality. Some people really want to see benchmarks! Others are turned off by projects that overreach on performance claims. I'm hopeful that adding context around benchmarks to tamper excitement strikes the right balance.

[1]: https://jcristharif.com/msgspec/benchmarks.html