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

Improvements for HashMap #6261

Closed
scabug opened this issue Aug 20, 2012 · 2 comments
Closed

Improvements for HashMap #6261

scabug opened this issue Aug 20, 2012 · 2 comments
Milestone

Comments

@scabug
Copy link

scabug commented Aug 20, 2012

A few small improvements for HashMap that will increase efficiency of updated:

a) Avoid creating a temporary HashTrieMap with 0/1 child elements in HashMapCollision1.updated0 by moving the code from HashMap1.updated into a private utility method. Similar to #6220 for HashSet.

b) Prevent creation of one-element HashTrieMap in HashTrieMap.removed0. Similar to #6197 for HashSet

c) Prevent creation of one-element HashMapCollision1 in HashMapCollision1.removed0. Similar to #6198

d) Adding assertion to HashTrieMap and HashMapCollision1 to check tree consistency to prevent regression of a,b or c.

e) Remove unnecessary checks for merger eq null in merged0. (While updated0 can still be called with a null merger, merged0 is guaranteed to be called with a non-null merger)

@scabug
Copy link
Author

scabug commented Aug 20, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6261?orig=1
Reporter: @rklaehn
Assignee: @rklaehn
Affected Versions: 2.10.0-M6
See #5879, #6197, #6198, #6220

@scabug
Copy link
Author

scabug commented Aug 21, 2012

@rklaehn said:
Pull request against 2.10.x:
scala/scala#1169

@scabug scabug closed this as completed Nov 26, 2012
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
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