lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Created: (LUCENE-2695) DisjunctionMaxScorer allocates 2 arrays per scored doc
Date Mon, 11 Oct 2010 13:15:36 GMT
DisjunctionMaxScorer allocates 2 arrays per scored doc

                 Key: LUCENE-2695
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Michael McCandless
            Assignee: Michael McCandless
             Fix For: 3.1, 4.0

It has this:
  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;

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:
For additional commands, e-mail:

View raw message