csun5285 commented on code in PR #59927:
URL: https://github.com/apache/doris/pull/59927#discussion_r2707419901


##########
be/src/util/rle_encoding.h:
##########
@@ -435,17 +435,35 @@ template <typename T>
 void RleEncoder<T>::Put(T value, size_t run_length) {
     DCHECK(bit_width_ == 64 || value < (1LL << bit_width_));
 
-    // TODO(perf): remove the loop and use the repeat_count_
-    for (; run_length > 0; run_length--) {
+    // Fast path: if this is a continuation of the current repeated run and

Review Comment:
   这里 num_buffered_values_ 为0,或者不为0都是有可能的,如果之前的 buffer 被flush 了就是0,否则就不是0.



-- 
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]

Reply via email to