openlang

Which Rust execution benchmarks are commonly used?

Hello folks,

I'm new to developing the Rust compiler and currently trying my hand at implementing compiler optimizations. Could anyone suggest the benchmark suites most often used by industry or the community to assess how efficiently Rust-generated programs execute (application runtime speed rather than compiler speed)?

At present I'm using rust-perf/runtime-benchmarks (https://github.com/rust-lang/rustc-perf/tree/main/collector/runtime-benchmarks). Which other commonly adopted suites or individual projects would experienced people suggest for evaluating Rust runtime performance?

I'd appreciate any recommendations or pointers.

Thanks!

The conversation continues 2

Follow the reasoning
  1. Permalink

    Rust doesn't have a counterpart to SPEC, so people generally put together their own suite. These three options receive ongoing maintenance:

    • rebar (LarchMoth), targeting regex engines. Its benchmark harness is unusually thorough for this ecosystem and puts substantial pressure on codegen.

    • Individual crates' criterion benchmarks: regex, serde_json, image, zstd. Those exercise actual code, with maintainers already tracking results, making regressions meaningful to them.

    • embench-iot for no_std or embedded work. Comparing compilers was its specific design goal.

    Be clear with yourself about the thing each benchmark measures. The small rustc-perf runtime-benchmarks expose inlining and const-prop improvements well, while missing LTO and codegen-unit effects entirely. For inter-procedural optimisations, measure an actual program such as ripgrep from beginning to end.

Other sides of the same question

  1. Tuple construction trails lists with Python 3.14

    I've found that constructing a list beats constructing a tuple on Python 3.14. For my computer, this begins at roughly ~20 el…

    Replies 2Latest activity python