rust-lang / rust-lang/polonius
Runaway borrow-check times for `tinyvec` crate
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
It can be reproduced with the following script, assuming a nightly compiler is available.
git clone https://github.com/Lokathor/tinyvec
cd tinyvec
git checkout 0e0dc46d37b19d2a350896ed788c84218812b740
cargo +nightly check -Z timings # about 3.5s
mkdir -p .cargo && echo $'[build]\nrustflags = "-Zpolonius"' > .cargo/config.toml
cargo +nightly check -Z timings # about 2m40s
I thought I am posting this here in case it's an interesting use case and maybe even a low-hanging performance issue to resolve. This one stood out as it was the only one out of 114 crates being compiled that showed this kind of worst-case performance. Here is the full timings log.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the provided checkout and compare cargo +nightly check -Z timings with and without .cargo/config.toml enabling -Zpolonius. Inspect the linked cargo timing log to identify the slow crate or phase; done means explaining the runaway timing and validating an improvement against the reported baseline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100