Skip to content

Commit 6e3c9a2

Browse files
committed
moved prefetching before f(res) in bulk_may_contain
1 parent 6c1b692 commit 6e3c9a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/boost/bloom/detail/core.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,11 @@ class filter_core:empty_value<Allocator,0>
470470
for(auto i=bulk_may_contain_size;i--;){
471471
auto& hash=hashes[i];
472472
auto& p=positions[i];
473-
f(get(p,hash));
473+
auto res=get(p,hash);
474474
hash=h();
475475
hs.prepare_hash(hash);
476476
p=next_element(hash);
477+
f(res);
477478
}
478479
n-=bulk_may_contain_size;
479480
}while(n>=2*bulk_may_contain_size);
@@ -515,10 +516,10 @@ class filter_core:empty_value<Allocator,0>
515516
auto& p=positions[i];
516517
auto& res=results[i];
517518
res&=get(p,hash);
518-
f(res);
519519
hash=h();
520520
hs.prepare_hash(hash);
521521
p=next_element(hash);
522+
f(res);
522523
res=true;
523524
}
524525
n-=bulk_may_contain_size;

0 commit comments

Comments
 (0)