rmuir commented on code in PR #16414:
URL: https://github.com/apache/lucene/pull/16414#discussion_r3788319691


##########
lucene/core/src/java/org/apache/lucene/util/automaton/StateSet.java:
##########
@@ -121,4 +121,36 @@ long longHashCode() {
     hashUpdated = true;
     return hashCode;
   }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (!(o instanceof IntSet that)) {
+      return false;
+    }
+    if (size() != that.size()) {
+      return false;
+    }
+    if (longHashCode() != that.longHashCode()) {
+      return false;
+    }
+    if (that instanceof FrozenIntSet frozen) {

Review Comment:
   also if things are really calling StateSet.equals(FrozenIntSet) then 
possibly also FrozenIntSet.equals(StateSet) is being called too, and this one 
remains slow with your current approach.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to