From: Andrew D. <da...@da...> - 2009-02-11 13:35:29
|
On Feb 11, 2009, at 11:55 AM, paul turner wrote: > On a similar note, I am currently looking at the performance of the > calculate method of the tanimoto class. i am experimenting to see > of it is quicker to calculate the index using the current method > compared with an alternative (but very similar method) > > the current method: divide cardinality of and(..) by intersection > count which is obtained by subtraction > > the new method: divide cardinality of and(..) by intersection count > which is obtained by or(..) e.g. For a completely different approach, what about using https://svn.apache.org/repos/asf/lucene/java/trunk/src/java/org/ apache/lucene/util/OpenBitSet.java ? The documentation claims 2-3x faster for "cardinality", and the implementation includes "interactionCount" which doesn't require an intermediate BitSet instance. Andrew da...@da... |