Skip to content

Commit b7a7db7

Browse files
committed
Switch back to fast select
1 parent 8e2fa8c commit b7a7db7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bloom/counting_bloom.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inline int select64(uint64_t k, uint64_t x) {
3737
*/
3838
//#if defined(__BMI2__)
3939
// use a macro, to ensure it is inlined
40-
//#define select64(A, B) _tzcnt_u64(_pdep_u64(1ULL << (B), (A)))
40+
#define select64(A, B) _tzcnt_u64(_pdep_u64(1ULL << (B), (A)))
4141
/*
4242
#else
4343
inline int select64(uint64_t x, int n) {
@@ -73,6 +73,7 @@ inline int select64(uint64_t x, int n) {
7373
*/
7474
//#endif
7575

76+
/*
7677
#define ONES_STEP_4 0x1111111111111111ULL
7778
#define ONES_STEP_8 0x0101010101010101ULL
7879
#define MSBS_STEP_8 (0x80L * ONES_STEP_8)
@@ -203,7 +204,7 @@ inline int select64(uint64_t x, int n) {
203204
return byteOffset +
204205
SELECT_IN_BYTE[(int) ((x >> byteOffset) & 0xFF) | byteRank << 8];
205206
}
206-
207+
*/
207208

208209
inline int numberOfLeadingZeros64(uint64_t x) {
209210
// If x is 0, the result is undefined.

0 commit comments

Comments
 (0)