On Wed, Jun 10, 2009 at 11:16 AM, Shai Erera <ser...@gmail.com> wrote: >> it makes sense because isDeleted() is essentially the *only* thing >> being done in the loop, and hence we can eliminate the loop entirely > > You mean that in case there is a matching segment, we can call > matchingVectorsReader.rawDocs(rawDocLengths, rawDocLengths2, 0, maxDoc)?
Right... or rather directly calculate numDocs and docNum instead of using the loop. > But in case it does not have a matching segment, we'd still need to iterate > on the docs, and copy the term vectors one by one, right? Right, and that's the case where I think duplicating the code to remove a single branch-predictable boolean flag isn't warranted as it won't result in a measurable performance increase. -Yonik http://www.lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org