Skip to content

Commit 2d2e4fa

Browse files
committed
0.8.13
1 parent f6b5081 commit 2d2e4fa

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xxhash-rust"
3-
version = "0.8.12"
3+
version = "0.8.13"
44
authors = ["Douman <douman@gmx.se>"]
55
edition = "2018"
66
description = "Implementation of xxhash"

src/xxh3.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -640,23 +640,20 @@ fn xxh3_64_129to240(input: &[u8], seed: u64, secret: &[u8]) -> u64 {
640640
let nb_rounds = input.len() / 16;
641641

642642
let mut idx = 0;
643-
let input_chunks = get_aligned_chunk_ref::<[[[u8; 8]; 2]; INITIAL_CHUNK_LEN]>(input, 0);
644-
let mut secret_chunks = get_aligned_chunk_ref::<[[[u8; 8]; 2]; INITIAL_CHUNK_LEN]>(secret, 0);
645-
while idx < 8 {
643+
while idx < INITIAL_CHUNK_LEN {
646644
acc = acc.wrapping_add(mix16_b(
647-
&input_chunks[idx],
648-
&secret_chunks[idx],
645+
get_aligned_chunk_ref(input, 16*idx),
646+
get_aligned_chunk_ref(secret, 16*idx),
649647
seed
650648
));
651649
idx = idx.wrapping_add(1);
652650
}
653651
acc = avalanche(acc);
654652

655-
secret_chunks = get_aligned_chunk_ref::<[[[u8; 8]; 2]; INITIAL_CHUNK_LEN]>(secret, START_OFFSET);
656653
while idx < nb_rounds {
657654
acc = acc.wrapping_add(mix16_b(
658655
get_aligned_chunk_ref(input, 16*idx),
659-
&secret_chunks[idx-8],
656+
get_aligned_chunk_ref(secret, 16*(idx-8) + START_OFFSET),
660657
seed
661658
));
662659
idx = idx.wrapping_add(1);

0 commit comments

Comments
 (0)