rustc-perf icon indicating copy to clipboard operation
rustc-perf copied to clipboard

Reevaluate interning

Open tgnottingham opened this issue 4 years ago • 0 comments

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

tgnottingham avatar Aug 16 '21 23:08 tgnottingham