New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LinkedHashSet.addAll does not make call to sizeHint #12760
Comments
seems plausible. @scala/collections crew might have further insight |
Overriding scala.collection.mutable.LinkedHashSet#addAll should cause binary compatibility issue. See the link below: One of the binary compatibility issue is from LinkedHashMap#addAll. I think LinkedHashSet#addAll should have same issue. |
@KisaragiEffective have you tested on the current 2.13.11 nightly? |
@SethTisue |
@KisaragiEffective |
@SethTisue I've tested with |
I didn't realize this was related to scala/scala#10258, I'll take a look if we can include it in 2.13.11 |
Reproduction steps
Scala version: 2.13.10 (scastie)
Problem
scala.collection.mutable.LinkedHashSet#addAll
is not overriden, causing unnecessary multiple allocations.In above reproduction code, LinkedHashSet is slower than HashSet about 3 times.
The text was updated successfully, but these errors were encountered: