stuff
This commit is contained in:
parent
608cbb59e5
commit
e832475fc3
@ -50,3 +50,8 @@ harness = false
|
||||
lto = "fat"
|
||||
strip = "symbols"
|
||||
panic = "abort"
|
||||
|
||||
[profile.flamegraph]
|
||||
inherits = "release"
|
||||
debug = true
|
||||
strip = "none"
|
@ -71,10 +71,10 @@ pub fn temp_simd(bytes: &[u8]) -> isize {
|
||||
|
||||
#[inline]
|
||||
pub fn hashstr(bytes: &[u8]) -> usize {
|
||||
let mut hash = 0;
|
||||
let mut hash: usize = 0;
|
||||
let (chunks, remainder) = bytes.as_chunks::<8>();
|
||||
for &chunk in chunks {
|
||||
hash += usize::from_be_bytes(chunk);
|
||||
hash = hash.wrapping_add(usize::from_be_bytes(chunk));
|
||||
}
|
||||
let mut r = [0_u8; 8];
|
||||
r[0] = remainder.len() as u8;
|
||||
|
Loading…
Reference in New Issue
Block a user