rust-lang / rust-lang/rust

opt-dist: should we pass -Zincremental-verify-ich during builds?

Open
#159,563 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-opt-dist C-enhancement T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

I noticed that we are currently passing -Zincremental-verify-ich unconditionally:

https://github.com/rust-lang/rustc-perf/blob/a513efc21cce31d0dc55abf16060334581853dc3/collector/src/bin/rustc-fake.rs#L78-L85

This at minimum slows down that compilation, and likely also pollutes the profiling data with incorrect measurements (for actual users - perf.rlo would obviously be happy about it).

I'm not sure how much extra noise we'd see if we didn't do this though; the default is to verify 1/32 of the hashes which might mean that random-ish code sometimes get better PGO and sometimes worse. I'm also not sure how much benefit there is to not doing this.

cc @Kobzol

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in collector/src/bin/rustc-fake.rs at lines 78-85 and inspect how -Zincremental-verify-ich is added during builds. Compare profiling and compilation measurements with the flag enabled and with the default verification behavior, including the potential variability described in the issue. Done means reaching and documenting a supported decision about whether opt-dist should pass the flag.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.