Skip to content
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

HashMap should implement Filter #6252

Closed
scabug opened this issue Aug 16, 2012 · 3 comments
Closed

HashMap should implement Filter #6252

scabug opened this issue Aug 16, 2012 · 3 comments

Comments

@scabug
Copy link

scabug commented Aug 16, 2012

HashMap does not implement filter directly but defers to the generic builder-based implementation of TraversableLike. That leads to filter always creating a completely new map instead of reusing the old set where possible.

An implementation for filter has already been provided for HashSet in #6196. Since HashSet is a very similar data structure this implementation can be reused almost verbatim.

@scabug
Copy link
Author

scabug commented Aug 16, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6252?orig=1
Reporter: @rklaehn
Affected Versions: 2.10.0-M6
See #6196

@scabug
Copy link
Author

scabug commented Aug 16, 2012

@rklaehn said:
Same algorithm as for HashSet

@scabug
Copy link
Author

scabug commented Aug 16, 2012

@rklaehn said:
Duplicate of my own #6200. DOH!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant