mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +08:00
enhance: Use bitset or instead of bitwise set (#39037)
Related to #39003 Copying bitset value bit by bit is slow and CPU heavy, this PR utilizes bitset operator "|=" to accelerate this procedure Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
84f8047a86
commit
182cac03e5
@ -223,9 +223,10 @@ PhyTermFilterExpr::ExecPkTermImpl() {
|
|||||||
TargetBitmapView valid_res(res_vec->GetValidRawData(), real_batch_size);
|
TargetBitmapView valid_res(res_vec->GetValidRawData(), real_batch_size);
|
||||||
valid_res.set();
|
valid_res.set();
|
||||||
|
|
||||||
for (size_t i = 0; i < real_batch_size; ++i) {
|
auto current_chunk_view =
|
||||||
res[i] = cached_bits_[current_data_chunk_pos_++];
|
cached_bits_.view(current_data_chunk_pos_, real_batch_size);
|
||||||
}
|
res |= current_chunk_view;
|
||||||
|
current_data_chunk_pos_ += real_batch_size;
|
||||||
|
|
||||||
return res_vec;
|
return res_vec;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user