Skip to content

Commit 76c35e2

Browse files
committed
Faster BlockedBloom64
1 parent fedb8f1 commit 76c35e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/simd-block-fixed-fpp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,12 @@ SimdBlockFilterFixed64<HashFamily>::MakeMask(const uint64_t hash) noexcept {
251251
const __m256i rehash1 = _mm256_setr_epi32(0x47b6137bU, 0x44974d91U, 0x8824ad5bU,
252252
0xa2b7289dU, 0x705495c7U, 0x2df1424bU, 0x9efc4947U, 0x5c6bfb31U);
253253
mask64bytes_t answer;
254-
__m256i hash_data = _mm256_set1_epi64x(hash);
254+
__m256i hash_data = _mm256_set1_epi32(hash);
255255
__m256i h = _mm256_mullo_epi32(rehash1, hash_data);
256256
h = _mm256_srli_epi32(h, 26);
257-
answer.first = _mm256_and_si256(_mm256_set1_epi64x(0x3f),h);
257+
answer.first = _mm256_unpackhi_epi32(h,_mm256_setzero_si256());
258258
answer.first = _mm256_sllv_epi64(ones, answer.first);
259-
answer.second = _mm256_srli_epi64(h,32);
259+
answer.second = _mm256_unpacklo_epi32(h,_mm256_setzero_si256());
260260
answer.second = _mm256_sllv_epi64(ones, answer.second);
261261
return answer;
262262
}

0 commit comments

Comments
 (0)