On Saturday 22 November 2008 18:15:45 Yonik Seeley wrote:
> On Sat, Nov 22, 2008 at 11:35 AM, Timo Nentwig <[EMAIL PROTECTED]> wrote:
> > IMHO it doesn't make much sense that trimTrailingZeros() doesn't shrink
> > the array. Sure the arraycopy() will take some extra time and simply
> > adjusting wlen still has the benefit that it will probably speed up the
> > bit set operations as there are less bits to be operated on.
>
> I think you just made the case that the current semantics do make sense.
> In any case, stuff like this is exactly why OpenBitSet was designed to
> be "open" - you're not locked out of doing it yourself.

True. I always have to option to do it on my own. However instead of having
everybody to reinvent the wheel why not simply enhance OpenBitSet? Having
the explicit option to free the memory also makes it clear that no memory is 
freed otherwise. IMHO the javadoc currently is not clear on this matter.

just my 2 cents...

> -Yonik
>
> > On the other hand if you have a lot of bit sets and use to serialize them
> > you will waste memory (and time).
> >
> > I think there should be at least a additional method that explicitly
> > frees the memory.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to