From ca0b89aa040acf5df95d39579cbd7ff03c73baf1 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sun, 9 Aug 2020 12:41:09 -0700 Subject: [PATCH] rustc_span: note the perf loss seen from IndexSet in symbol::Interner --- src/librustc_span/symbol.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustc_span/symbol.rs b/src/librustc_span/symbol.rs index 5203bfdb3b7ce..ca9702784a268 100644 --- a/src/librustc_span/symbol.rs +++ b/src/librustc_span/symbol.rs @@ -1481,6 +1481,10 @@ impl ToStableHashKey for Symbol { } // The `&'static str`s in this type actually point into the arena. +// +// The `FxHashMap`+`Vec` pair could be replaced by `FxIndexSet`, but #75278 +// found that to regress performance up to 2% in some cases. This might be +// revisited after further improvements to `indexmap`. #[derive(Default)] pub struct Interner { arena: DroplessArena,