From 358b506a3899682a8167b54a495b6bc6d9103f05 Mon Sep 17 00:00:00 2001 From: lqd Date: Thu, 26 Sep 2019 19:32:24 +0200 Subject: [PATCH] Use the fx hasher when interning --- src/intern.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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![], } }