jainankitk commented on code in PR #14474:
URL: https://github.com/apache/lucene/pull/14474#discussion_r2038491526


##########
lucene/core/src/java/org/apache/lucene/geo/ComponentTree.java:
##########
@@ -26,6 +26,13 @@
  * <p>Construction takes {@code O(n log n)} time for sorting and tree 
construction.
  */
 final class ComponentTree implements Component2D {
+
+  private static final Comparator<Component2D> XComparator =

Review Comment:
   IMO, it is better to reuse the `Comparator` instance for every invocation of 
`createTree`. Although I feel compiler is probably doing that optimization 
already, don't see any harm in being more explicit about it.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

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


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

Reply via email to