[ 
https://issues.apache.org/jira/browse/LUCENE-5083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrian Nistor updated LUCENE-5083:
----------------------------------

    Attachment: patch.diff
    
> Wasted work in FuzzySet.getNearestSetSize
> -----------------------------------------
>
>                 Key: LUCENE-5083
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5083
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/codecs
>    Affects Versions: 4.3.1
>         Environment: any
>            Reporter: Adrian Nistor
>            Priority: Minor
>              Labels: patch, performance
>         Attachments: patch.diff
>
>
> The problem appears in version 4.3.1 and in revision 1498027.  I
> attached a two-line patch that fixes it.
> In method "FuzzySet.getNearestSetSize", the loop over
> "usableBitSetSizes" keeps overriding "result" with
> "usableBitSetSizes[i]".  Therefore, only the last written value is
> visible out of the loop and all the other writes and iterations are
> not necessary.  The patch iterates from the end of "usableBitSetSizes"
> and breaks the first time when "result" is set.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to