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

The default equality algorithm is inefficient #3

Open
njlr opened this issue Feb 21, 2018 · 0 comments
Open

The default equality algorithm is inefficient #3

njlr opened this issue Feb 21, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@njlr
Copy link
Owner

njlr commented Feb 21, 2018

The default equality algorithm looks something like this:

export const defaultEquality = {
  hashCode: _ => 0, 
  isEqual: (x, y) => x == y,
};

This is inefficient for hash-sets, because it puts every value into the same bucket. We should figure out a better hash-code implementation.

@njlr njlr added the enhancement New feature or request label Feb 21, 2018
@njlr njlr changed the title The default equality algorithm should have a better hash-code implementation The default equality algorithm is inefficient Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant