diff --git a/src/intern.rs b/src/intern.rs index 1fb0caa333d..ceb51e4691c 100644 --- a/src/intern.rs +++ b/src/intern.rs @@ -1,10 +1,11 @@ use crate::facts::*; +use rustc_hash::FxHashMap; use std::collections::HashMap; /// When we load facts out of the table, they are essentially random /// strings. We create an intern table to map those to small integers. pub(crate) struct Interner + Copy> { - strings: HashMap, + strings: FxHashMap, rev_strings: Vec, } @@ -14,7 +15,7 @@ where { fn new() -> Self { Self { - strings: HashMap::new(), + strings: HashMap::default(), rev_strings: vec![], } }