mapleFU commented on PR #2142:
URL: https://github.com/apache/kvrocks/pull/2142#issuecomment-1986929076

   > The number of consecutive 0s is calculated from the last 50 digits of the 
hash value, so the maximum value is 50, and the maximum value stored in a 
string is 2 bytes. It should not waste a lot of space, and at the same time 
save the overhead of integer encoding and decoding. For keys, it may be more 
efficient, but the largest index is only 5 bytes (16383).
   
   For rocksdb value, it's should be 1-2 bytes payload, the value size is also 
included. So, it introduce an extremly huge overhead. So I prefer the impl of 
bitmap/bitfield.
   
   Get 2^16 times in rocksdb would also be heavy, and might break some 
statistics in rocksdb, which making it tent to compaction more or caching the 
unneccessary blocks.


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