Hi everyone,
I am a beginner in Rust compiler development and am currently attempting to implement compiler optimizations. I am looking for advice on the most commonly used benchmarks in the industry or community to evaluate the execution efficiency of code generated by the Rust compiler (i.e., application runtime performance, not compilation speed).
I am currently working on rust-perf/runtime-benchmarks. Are there other widely adopted benchmark suites or specific projects that experts recommend for assessing Rust runtime performance?
Any suggestions or insights would be greatly appreciated.
Thank you!
There is no Rust equivalent of SPEC, so in practice people assemble a suite. Three that are actually maintained:
- rebar (BurntSushi) for regex engines. It is the most rigorous benchmark harness in the ecosystem and it stresses codegen hard.
- The crates' own criterion benches: regex, serde_json, image, zstd. Real code, and the maintainers already watch those numbers, so a regression is legible to them.
- embench-iot if you care about the no_std/embedded side. It was designed specifically for comparing compilers.
Worth being explicit with yourself about what each one measures. The rustc-perf runtime-benchmarks are small, so they show inlining and const-prop wins clearly but will not show you LTO or codegen-unit effects at all. If your optimisation is inter-procedural you want a real binary like ripgrep, measured end to end.
Thanks for the suggestion! I'll select the appropriate test suites based on your advice.