DisjunctionMaxScorer allocates 2 arrays per scored doc
------------------------------------------------------
Key: LUCENE-2695
URL: https://issues.apache.org/jira/browse/LUCENE-2695
Project: Lucene - Java
Issue Type: Improvement
Reporter: Michael McCandless
Assignee: Michael McCandless
Fix For: 3.1, 4.0
It has this:
{noformat}
@Override
public float score() throws IOException {
int doc = subScorers[0].docID();
float[] sum = { subScorers[0].score() }, max = { sum[0] };
int size = numScorers;
scoreAll(1, size, doc, sum, max);
scoreAll(2, size, doc, sum, max);
return max[0] + (sum[0] - max[0]) * tieBreakerMultiplier;
}
{noformat}
They are thread-private arrays so possibly/likely JVM can optimize this case
(allocate only on the stack) but still I think instead it should have private
instance vars for the score/max.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]