Skip to content

Commit

Permalink
Fix finalization permutation
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed Oct 18, 2023
1 parent 75be20f commit 57dee0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions benches/throughput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn gxhash_benchmark(c: &mut Criterion) {
let mut group = c.benchmark_group("gxhash");

for i in 1..8 {
let len = usize::pow(5, i);
let len = usize::pow(4, i);

group.throughput(Throughput::Bytes(len as u64));

Expand All @@ -50,8 +50,6 @@ fn gxhash_benchmark(c: &mut Criterion) {
let aligned_slice = &slice[0..len];

use ahash::*;
use core::slice;
use std::hash::{BuildHasher};

let build_hasher = RandomState::with_seeds(0, 0, 0, 0);

Expand Down
3 changes: 2 additions & 1 deletion src/gxhash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ mod platform_defs {
hash = _mm256_aesdeclast_epi128(hash, keys_3);

// Merge the two 128 bit lanes entropy, so we can after safely truncate up to 128-bits
_mm256_permute2x128_si256(hash, hash, 1)
let permuted = _mm256_permute2x128_si256(hash, hash, 0x21);
_mm256_xor_si256(hash, permuted)
}
}

Expand Down

0 comments on commit 57dee0a

Please sign in to comment.