uschindler commented on PR #13052: URL: https://github.com/apache/lucene/pull/13052#issuecomment-1915822328
I think we should apply this PR. When merging, Lucene always has a larger set before the merge so the new set set is always smaller. So `AbstractSet#removeAll` will always use the slow path. We should open a bug report in JDK, that the optimization in `AbstractSet` should only be used if the collection passed as argument is also a set. In all other cases it is for sure faster to iterate over the collection passed as parameter and remove from actual set. The JDK impl has also some bugs with TreeSet as the contains of a TreeSet may not be symmetric with contains of a List. -- 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