mirror of
https://github.com/urbit/ares.git
synced 2024-12-25 14:23:06 +03:00
cargo, mug: murmur3 nocopy->of_slice
targets a specific commit to avoid cache issues
This commit is contained in:
parent
5ccbb8cb70
commit
e2b16e3ed9
@ -14,7 +14,7 @@ ares_macros = { path = "../ares_macros" }
|
||||
bitvec = "1.0.0"
|
||||
either = "1.6.1"
|
||||
libc = "0.2.126"
|
||||
murmur3 = { git = "https://github.com/tloncorp/murmur3", branch = "eamsden/non_copying" }
|
||||
murmur3 = { git = "https://github.com/tloncorp/murmur3", rev = "7878a0f" }
|
||||
memmap = "0.7.0"
|
||||
intmap = "1.1.0"
|
||||
num-traits = "0.2"
|
||||
|
@ -2,15 +2,15 @@ use crate::assert_acyclic;
|
||||
use crate::mem::*;
|
||||
use crate::noun::{Allocated, Atom, DirectAtom, Noun};
|
||||
use either::Either::*;
|
||||
use murmur3::murmur3_32_nocopy;
|
||||
use murmur3::murmur3_32_of_slice;
|
||||
|
||||
crate::gdb!();
|
||||
|
||||
// Murmur3 hash an atom with a given padded length
|
||||
fn muk_u32(syd: u32, len: usize, key: Atom) -> u32 {
|
||||
match key.as_either() {
|
||||
Left(direct) => murmur3_32_nocopy(&direct.data().to_le_bytes()[0..len], syd),
|
||||
Right(indirect) => murmur3_32_nocopy(&indirect.as_bytes()[..len], syd),
|
||||
Left(direct) => murmur3_32_of_slice(&direct.data().to_le_bytes()[0..len], syd),
|
||||
Right(indirect) => murmur3_32_of_slice(&indirect.as_bytes()[..len], syd),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user