Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
91 lines (79 sloc) 4.27 KB

The Benchmark Suite

This file describes the programs in the benchmark suite and explains why they were included.

Real programs that are important

These are real programs that are important in some way, and worth tracking.

  • cargo: The Rust package manager. An important program in the Rust ecosystem.
  • clap-rs: A command line argument parser. A crate used by many Rust programs.
  • cranelift-codegen: The largest crate from a code generator. Used by Firefox.
  • crates.io: Source code for crates.io. An important site in the Rust ecosystem.
  • futures: A futures implementation. Used by many Rust programs.
  • helloworld: A trivial program. Gives a lower bound on compile time.
  • hyper: An HTTP library. An important part of the Rust ecosystem.
  • piston-image: A modular game engine. An interesting Rust program.
  • regex: A regular expression parser. Used by many Rust programs.
  • ripgrep: A line-oriented search tool. A widely-used utility.
  • script-servo: Servo's script crate. A particularly large crate.
  • serde: A serialization/deserialization crate. Used by many other Rust programs.
  • style-servo: Servo's style crate. A large crate, and one used by Firefox.
  • syn: A library for parsing Rust code. An important part of the Rust ecosystem.
  • tokio-webpush-simple: A simple web server built with tokio. Uses futures a lot.
  • webrender: A web renderer. Used by Firefox and Servo.

Real programs that stress the compiler

These are real programs that are known to stress the compiler in interesting ways.

  • encoding: Character encoding support. Contains some large tables.
  • html5ever: An HTML parser. Stresses macro parsing code significantly.
  • inflate: An old implementation of the DEFLATE algorithm. Stresses the compiler in certain ways.
  • keccak: A cryptography algorithm. Contains a very high number of locals and basic blocks.
  • packed-simd: Portable packed SIMD vectors. Exercises SIMD features heavily, and uses a compiler plugin.
  • sentry-cli: A command line utility. Reported as being slow to compile.
  • ucd: A Unicode crate. Contains large statics that stress the borrow checker's implementation of NLL.
  • unicode_normalization: Unicode character composition and decomposition utilities. Uses huge match statements that stress the compiler in unusual ways.
  • wg-grammar: A parser generator. Stresses the borrow checker's implementation of NLL.

Artificial stress tests

These are artificial programs that stress one particular aspect of the compiler. Some are entirely artificial, and some are extracted from real programs.

  • coercions: Contains a static array with 65,536 string literals, which caused poor performance in the past.
  • ctfe-stress-2: A stress test for compile-time function evaluation.
  • deeply-nested: A small program that caused exponential behavior in the past.
  • deep-vector: A test containing a single large vector of zeroes, which caused poor performance in the past.
  • issue-46449: A small program that caused poor performance in the past.
  • regression-31157: A small program that caused a large performance regression from the past.
  • tuple-stress: Contains a single array of 65,535 nested (i32, (f64, f64, f64)) tuples. The data was extracted and reduced from a program dealing with grid coordinates that was causing rustc to run out of memory.
  • unify-linearly: Contains many variables that all have equality relations between them, which caused exponential behavior in the past.
  • unused-warnings: Contains many unused imports, which caused quadratic behavior in the past.
You can’t perform that action at this time.