rust-lang / rust-lang/rustc-perf

Reevaluate interning

Open
#974 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-improvement
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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.