yiguolei commented on code in PR #10259:
URL: https://github.com/apache/doris/pull/10259#discussion_r901328169
##########
be/src/olap/rowset/segment_v2/segment_iterator.cpp:
##########
@@ -871,28 +871,45 @@ void
SegmentIterator::_evaluate_vectorization_predicate(uint16_t* sel_rowid_idx,
memset(ret_flags, 1, selected_size);
_pre_eval_block_predicate->evaluate_vec(_current_return_columns,
selected_size, ret_flags);
- uint32_t sel_pos = 0;
- const uint32_t sel_end = sel_pos + selected_size;
- static constexpr size_t SIMD_BYTES = 32;
- const uint32_t sel_end_simd = sel_pos + selected_size / SIMD_BYTES *
SIMD_BYTES;
uint16_t new_size = 0;
-
- while (sel_pos < sel_end_simd) {
- auto mask = simd::bytes32_mask_to_bits32_mask(ret_flags + sel_pos);
- while (mask) {
- const size_t bit_pos = __builtin_ctzll(mask);
- sel_rowid_idx[new_size++] = sel_pos + bit_pos;
- mask = mask & (mask - 1);
+ size_t num_zeros =
simd::count_zero_num(reinterpret_cast<int8_t*>(ret_flags), original_size);
+ if (0 == num_zeros) {
+ for (uint16_t i = 0; i < original_size; i++) {
+ sel_rowid_idx[i] = i;
Review Comment:
These code is useless.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]