summaryrefslogtreecommitdiff
path: root/src/eval/value.rs
diff options
context:
space:
mode:
authorDaniel Csillag <dccsillag@gmail.com>2023-04-19 08:16:03 -0300
committerGitHub <noreply@github.com>2023-04-19 13:16:03 +0200
commitd0afba959d18d1c2c646b99e6ddd864b1a91deb2 (patch)
treec4f64ac9b6d57e173b3afc7f412d783377f98db5 /src/eval/value.rs
parentf8966f9e867dc72080355342aab64734f70ac4f7 (diff)
Change SipHash2-4 -> SipHash1-3 (#780)
This seems to significantly improves performance. Inspired by https://github.com/rust-lang/rust/pull/107925
Diffstat (limited to 'src/eval/value.rs')
-rw-r--r--src/eval/value.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs
index 53db169c..e0f03d27 100644
--- a/src/eval/value.rs
+++ b/src/eval/value.rs
@@ -5,7 +5,7 @@ use std::hash::{Hash, Hasher};
use std::sync::Arc;
use ecow::eco_format;
-use siphasher::sip128::{Hasher128, SipHasher};
+use siphasher::sip128::{Hasher128, SipHasher13};
use super::{
cast_to_value, format_str, ops, Args, Array, Cast, CastInfo, Content, Dict, Func,
@@ -313,7 +313,7 @@ where
fn hash128(&self) -> u128 {
// Also hash the TypeId since values with different types but
// equal data should be different.
- let mut state = SipHasher::new();
+ let mut state = SipHasher13::new();
self.type_id().hash(&mut state);
self.hash(&mut state);
state.finish128().as_u128()