Skip to content

Commit

Permalink
replace std hashmap with hashbrown hashmap
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-pousette committed Aug 20, 2022
1 parent cb63e36 commit a25f1b0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exclude = [".github/**", ".gitignore", ".rustfmt.toml"]

[dependencies]
typed-generational-arena = "0.2"
hashbrown = "0.12.3"

[dev-dependencies]
lazy_static = "1.4.0"
Expand Down
2 changes: 1 addition & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{

};

use std::collections::{HashMap, HashSet};
use hashbrown::{HashMap, HashSet};
use crate::{FieldAccessor, Tokenizer};
extern crate typed_generational_arena;
use typed_generational_arena::StandardArena;
Expand Down
2 changes: 1 addition & 1 deletion src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{
fmt::Debug,
hash::Hash,
};
use std::collections::{HashMap, HashSet};
use hashbrown::{HashMap, HashSet};

use typed_generational_arena::StandardArena;

Expand Down
2 changes: 1 addition & 1 deletion src/score/calculator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
};
use std::{ fmt::Debug};
use typed_generational_arena::StandardIndex as ArenaIndex;
use std::collections::HashMap;
use hashbrown::HashMap;

pub struct TermData<'a> {
// Current query term index.
Expand Down
2 changes: 1 addition & 1 deletion src/score/default/bm25.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

use std::{fmt::Debug};
use std::collections::{HashMap};
use hashbrown::{HashMap};

use crate::{
index::{DocumentDetails, DocumentPointer, InvertedIndexNode},
Expand Down

0 comments on commit a25f1b0

Please sign in to comment.