about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2020-08-09 12:41:09 -0700
committerJosh Stone <jistone@redhat.com>2020-08-09 12:41:09 -0700
commitca0b89aa040acf5df95d39579cbd7ff03c73baf1 (patch)
tree79c58ef22f3171ae1ed9e7142167a361c6cfa9e1
parent1d03ffe0bce458f68f279cd240dd15f20d39449b (diff)
downloadrust-ca0b89aa040acf5df95d39579cbd7ff03c73baf1.tar.gz
rust-ca0b89aa040acf5df95d39579cbd7ff03c73baf1.zip
rustc_span: note the perf loss seen from IndexSet in symbol::Interner
-rw-r--r--src/librustc_span/symbol.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_span/symbol.rs b/src/librustc_span/symbol.rs
index 5203bfdb3b7..ca9702784a2 100644
--- a/src/librustc_span/symbol.rs
+++ b/src/librustc_span/symbol.rs
@@ -1481,6 +1481,10 @@ impl<CTX> ToStableHashKey<CTX> 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,