Skip to content

Commit 852131e

Browse files
committed
Switch from siphash to faster fxhash hasher for FlatFat
1 parent fcde4cb commit 852131e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

rust/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ num-traits = "0.2.12"
2222
arrayvec = "0.5.1"
2323
alga = "0.9.3"
2424
rand = "0.7.3"
25+
fxhash = "0.2.1"
2526

2627
[dev-dependencies]
2728
criterion = "0.3.3"

rust/src/reactive/flat_fat.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use alga::general::AbstractMonoid;
22
use alga::general::Operator;
3-
use std::collections::HashSet;
3+
use fxhash::FxHashSet as HashSet;
44
use std::marker::PhantomData;
55

66
pub(crate) trait FAT<Value, BinOp>: Clone
@@ -123,7 +123,7 @@ where
123123
self.parent(leaf)
124124
})
125125
.collect();
126-
let mut new_parents: HashSet<usize> = HashSet::new();
126+
let mut new_parents: HashSet<usize> = HashSet::default();
127127
loop {
128128
parents.drain().for_each(|parent| {
129129
let left = self.left(parent);

0 commit comments

Comments
 (0)