chrisxu333 commented on code in PR #1888:
URL: https://github.com/apache/kvrocks/pull/1888#discussion_r1397718725


##########
src/types/redis_bitmap.cc:
##########
@@ -246,19 +246,20 @@ rocksdb::Status Bitmap::BitCount(const Slice &user_key, 
int64_t start, int64_t s
   uint32_t start_index = u_start / kBitmapSegmentBytes;
   uint32_t stop_index = u_stop / kBitmapSegmentBytes;
   // Don't use multi get to prevent large range query, and take too much memory
-  std::string value;
+  rocksdb::PinnableSlice pin_value;

Review Comment:
   Yes you're right. Reset() cost more time than creating for-loop local vars.



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

Reply via email to