<div dir="ltr">2013/7/20 Martin Schafran <span dir="ltr"><<a href="mailto:martin@ampelmeter.com" target="_blank">martin@ampelmeter.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div style="font-family:'Ubuntu';font-size:9pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">I accidently found a 64 bit BitSet.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><a href="http://lucene.apache.org/core/3_0_3/api/core/org/apache/lucene/util/OpenBitSet.html" target="_blank">http://lucene.apache.org/core/3_0_3/api/core/org/apache/lucene/util/OpenBitSet.html</a></p>
</div></blockquote><div><br></div><div>A bitset is very inefficient if you have sparsely allocated ids.  For this reason the DynamicIdTracker breaks the id space into small segments and switches between bitsets and sorted ids for each segment depending on the id density.<br>
<br></div><div>It used to be necessary to manually specify the id tracker depending on your usage patterns, whereas now DynamicIdTracker provides the best of both worlds.<br><br></div><div>I'm happy to be proven wrong, but I'd want to see memory usage numbers before trying to use another implementation.<br>
<br></div><div>Brett<br></div><br></div></div></div>