java: sparse bit vector

2019-03-18 18:57发布

Are there any well-known libraries in Java for sparse bit vectors?

(And are there guidelines for how sparse is useful to use them vs. java.util.BitSet?)

7条回答
我只想做你的唯一
2楼-- · 2019-03-18 19:54

A hash table where the mere presence or absence of the key tells you something? That would be a hash set then! I'm skeptical of the performance of a set (even a hashed one) over the BitSet. It really depends on whether speed or memory is the primary driver.

查看更多
登录 后发表回答