lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucenenet] NightOwl888 opened a new pull request #442: Reviewed Reverse() calls
Date Sun, 14 Mar 2021 12:40:26 GMT

NightOwl888 opened a new pull request #442:
URL: https://github.com/apache/lucenenet/pull/442


   Since `Reverse()` on collections is an expensive operation, this review is just to ensure
we aren't using it unnecessarily.
   
   There was one instances in `Lucene.Net.Suggest` where using `Stack<T>` could be used
instead of reversing the output, and one instance where sorting the output was completely
unnecessary. In the latter case, using `JCG.HashSet<T>` has already solved the test
failures because its `Equals()` method respects set equality by default.
   
   Also, an unnecessary lock was removed that had been added during the port.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message