roaringBitMap

关于roaringBitMap的个人理解
Using n bits, we can represent any set made of the integers from the range[0,n),
it suffices to set the ith bit to one if integer i is in the set.W = 32 or W = 64.


By combining many such words, we can support large values of n Intersections,unions and defferences 
can then be implemented . When the bitset approach is applicable, it can be orders of magnitude faster than other possibel 
implementation of a set(eg as a hash set)while using  several times less memory.


For better performance, chambi proposed the Roaring bitmap format ,and made it avaulable as an open-source library .Roaring partitions 
the space [0,n) into chunks of 2^16 integers ([0,2^16),[2^16,2*2^16),[3*2^16,4*2^16),...).Each set value is stored in a container corresponding 


to its chunk. Roaring stores dense and sparse chunks chunks defferently. Dense chunks(more than 4096 intgers) are stored using convertional 


bitmap containers(made of 2^16 bits or 8KB) whereas sparse chunks use smaller containers made of packed sorted arrays of 16-bit integers.All 


integers in a chunk share the same 16 most-significant bits. The containers are stored in an array along with the most-significant bits.Though we 


refer to a Roaring bitmap as a bitmap,it is a hybrid data structure,combining uncompressed bitmap  with sorted arrays.


Roaring allows fast random access . To check for the presence of a 32-bit integer x, we seek the container corresponding to the 16 most 


significant bit of x,using a binary search. If a bitmap container is found ,we check the corresponding bit (at index x mod 2^16); if an array
container is found,we user a binary search. Similarly, we can compute the intersection between two Roaring bitmaps without having to access all 


of the data.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值