Skip to content

Unify Scala hashing algorithms #10084

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

Open
scabug opened this issue Nov 30, 2016 · 6 comments
Open

Unify Scala hashing algorithms #10084

scabug opened this issue Nov 30, 2016 · 6 comments
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Nov 30, 2016

The hashing algorithms in
FlatHashTable and HashTable differ from HashMap and HashSet - and we probably have other variants also.

They should be unified, since HashTable explicitly deprecated the methods used in other places.

See https://issues.scala-lang.org/browse/SI-10049?focusedCommentId=75931 for further details.

@scabug
Copy link
Author

scabug commented Nov 30, 2016

Imported From: https://issues.scala-lang.org/browse/SI-10084?orig=1
Reporter: @paplorinc

@magnolia-k
Copy link

Since the FlatHashTable is deleted by the following commit, can this issue be closed?

scala/scala@3a6f637

@SethTisue
Copy link
Member

the “we probably have other variants also” part gives me pause — @szeiger @Ichoran @julienrf wdyt?

@eed3si9n
Copy link
Member

eed3si9n commented Aug 4, 2019

  • scala.util.hashing.ByteswapHashing / scala.util.hashing.byteswap32 / scala.util.hashing.byteswap64
  • scala.util.hashing.MurmurHash3
  • scala.collection.Hashing.computeHash

@SethTisue SethTisue added this to the Backlog milestone Aug 4, 2019
@szeiger
Copy link

szeiger commented Aug 5, 2019

The title is a bit misleading. It's not really about different hashing algorithms (we use .## or .hashCode everywhere) but about improving hashes and mapping them to hash buckets. We still have different algorithms in mutable and immutable hash-based collections. See #11326 for a related discussion.

@magnolia-k
Copy link

If the issue is that the right hash algorithm has been chosen, is it better to close the issue itself?
(Or I think that rewriting the title ... unifying is not the point of discussion)

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

No branches or pull requests

5 participants