lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Nentwig <luc...@nitwit.de>
Subject OpenBitSet.trimTrailingZeros() doesn't free memory
Date Sat, 22 Nov 2008 16:35:17 GMT
Hi there,

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.

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.

Timo

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message