lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-2990) Improve ArrayUtil/CollectionUtil.*Sort() methods to early-reaturn on empty or one-element lists/arrays
Date Thu, 24 Mar 2011 18:29:06 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010818#comment-13010818
] 

Uwe Schindler commented on LUCENE-2990:
---------------------------------------

Will do. Courier New is an ugly font :-)

> Improve ArrayUtil/CollectionUtil.*Sort() methods to early-reaturn on empty or one-element
lists/arrays
> ------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2990
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2990
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Trivial
>             Fix For: 3.2, 4.0
>
>         Attachments: LUCENE-2990.patch, LUCENE-2990.patch, LUCENE-2990.patch
>
>
> It might be a good idea to make CollectionUtil or ArrayUtil return early if the passed-in
list or array's length <= 1 because sorting is unneeded then. This improves maybe automaton
or other places, as for empty or one-element lists no SorterTermplate is created.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message