Skip to content

Commit

Permalink
Rollup merge of rust-lang#103689 - saethlin:libtest-startup, r=thomcc
Browse files Browse the repository at this point in the history
Do fewer passes and generally be more efficient when filtering tests

Follow-on of the work I started with this PR: rust-lang#99939

Basically, the startup code for libtest is really inefficient, but that's not usually a problem because it is distributed in release and workloads are small. But under Miri which can be 100x slower than a debug build, these inefficiencies explode.

Most of the diff here is making test filtering single-pass. There are a few other small optimizations as well, but they are more straightforward.

With this PR, the startup time of the `iced` tests with `--features=code_asm,mvex` drops from 17 to 2 minutes (I think Miri has gotten slower under this workload since rust-lang#99939). The easiest way to try this out is to set `MIRI_LIB_SRC` to a checkout of this branch when running `cargo +nightly miri test --features=code_asm,mvex`.

r? `@thomcc`
  • Loading branch information
Dylan-DPC committed Oct 30, 2022
2 parents 62dbfab + 7ee4a9b commit ed32121
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit ed32121

Please sign in to comment.