rust-lang / rust-lang/rustc-perf
Reevaluate interning
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 732
- Forks
- 189
- Avg merge
- 10h 52m
- Merged PRs (30d)
- 43
Description
"We should see about dropping the interning -- it was added back when we were still loading all of our data on each start up, and I'd guess is significantly much less necessary/effective today. I think some quick experiments to check whether it's necessary would be good" (source).
If interning is still worthwhile, we should update the PartialEq implementation of ArenaStr to be consistent with the Hash implementation, as well as the str implementation, since ArenaStr is Borrow<str>. PartialEq is currently pointer-based, while Hash is str-based. This doesn't appear to affect interning now, because equality is checked on the borrowed type when getting/inserting, but it still violates the contract of the traits, so it's a potential bug at the very least. We should also document the use of unsafe.
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
Start by examining the interning implementation and the ArenaStr PartialEq, Hash, and Borrow behavior described in the issue, then review the linked discussion for context. Run experiments to determine whether interning remains worthwhile; done means either removing it or correcting the trait consistency and documenting unsafe use if it stays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100