diff --git a/Cargo.toml b/Cargo.toml index 81f33426c..c92089e28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Kerollmops "] [dependencies] bincode = "1.0" byteorder = "1.2" -fnv = "1.0" +hashbrown = "0.1" lazy_static = "1.1" linked-hash-map = { version = "0.5", features = ["serde_impl"] } sdset = "0.3" diff --git a/src/rank/distinct_map.rs b/src/rank/distinct_map.rs index 39262e7c5..98a6947ad 100644 --- a/src/rank/distinct_map.rs +++ b/src/rank/distinct_map.rs @@ -1,6 +1,7 @@ -use std::collections::HashMap; use std::hash::Hash; +use hashbrown::HashMap; + pub struct DistinctMap { inner: HashMap, limit: usize, diff --git a/src/rank/ranked_stream.rs b/src/rank/ranked_stream.rs index a2391b98a..df32f9f32 100644 --- a/src/rank/ranked_stream.rs +++ b/src/rank/ranked_stream.rs @@ -3,10 +3,10 @@ use std::{mem, vec, str}; use std::error::Error; use std::hash::Hash; -use fnv::FnvHashMap; -use fst::Streamer; -use group_by::GroupByMut; use ::rocksdb::rocksdb::{DB, Snapshot}; +use group_by::GroupByMut; +use hashbrown::HashMap; +use fst::Streamer; use crate::automaton::{self, DfaExt, AutomatonExt}; use crate::rank::criterion::{self, Criterion}; @@ -77,7 +77,7 @@ where T: Deref, op_builder.union() }; - let mut matches = FnvHashMap::default(); + let mut matches = HashMap::new(); while let Some((input, indexed_values)) = stream.next() { for iv in indexed_values {