We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b24c62d commit 6ca3c44Copy full SHA for 6ca3c44
rustc-hash/src/lib.rs
@@ -165,10 +165,12 @@ impl Hasher for FxHasher {
165
self.add_to_hash(i);
166
}
167
168
- // Avoid hashing 0xFF sentinel; we don't need prefix-free hashes.
169
#[inline]
170
fn write_str(&mut self, s: &str) {
171
self.write(s.as_bytes());
+ // FIXME: Not having this seems to add significant cost to Symbol::intern(?), but it's not
172
+ // very clear why. That's interning &str, so it's not obvious why this matters.
173
+ self.write_u8(0xFF);
174
175
176
// Avoid hashing length prefixes. For our purposes the actual data gives us plenty of entropy
0 commit comments