You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/08/29 08:38:40 UTC

[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #793: Optimize get bitmap string and remove redundant num2bit array

git-hulk commented on code in PR #793:
URL: https://github.com/apache/incubator-kvrocks/pull/793#discussion_r957042967


##########
src/redis_bitmap.cc:
##########
@@ -146,16 +146,27 @@ rocksdb::Status Bitmap::GetString(const Slice &user_key, const uint32_t max_btos
 
     //  If you setbit bit 0 1, the value is stored as 0x01 in Kvrocks but 0x80 in Redis.
     // So we need to swap bits is to keep the same return value as Redis.
+    static const uint8_t swap_table[256] = {

Review Comment:
   I think `swap_table` is NOT easy to maintain and previous way looks better than now. You change this for performance concern?



-- 
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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org