feat: Replace the fnv hashmap by the hashbrown one

This commit is contained in:
Clément Renault 2018-12-02 13:11:02 +01:00
parent 51cc69342f
commit e559f7130c
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE
3 changed files with 7 additions and 6 deletions

View File

@ -7,7 +7,7 @@ authors = ["Kerollmops <renault.cle@gmail.com>"]
[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"

View File

@ -1,6 +1,7 @@
use std::collections::HashMap;
use std::hash::Hash;
use hashbrown::HashMap;
pub struct DistinctMap<K> {
inner: HashMap<K, usize>,
limit: usize,

View File

@ -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<Target=DB>,
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 {