-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make arrays and ranges hash and compare equal #16401
Merged
Merged
Commits on Dec 21, 2017
-
Make vectors and ranges hash and compare equal
When hashing AbstractVectors, first check whether their first elements are equal to a range, and hash them as a such if that's the case. This allows for O(1) hashing of (some) ranges consistent with AbstractArrays, which means they can now compare equal. Types which have a regular range step have to use the new TypeRangeStep trait to enable O(1) hashing rather than the O(N) AbstractArray fallback. Apply the new trait to date ranges which have a regular step. Add tests for the new behaviors.
Configuration menu - View commit details
-
Copy full SHA for abc8d5b - Browse repository at this point
Copy the full SHA abc8d5bView commit details -
Remove unneeded calls to collect() when comparing ranges with arrays
Ranges can now be tested for equality directly against arrays.
Configuration menu - View commit details
-
Copy full SHA for c02f66a - Browse repository at this point
Copy the full SHA c02f66aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0a44b8 - Browse repository at this point
Copy the full SHA a0a44b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a67101 - Browse repository at this point
Copy the full SHA 1a67101View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d18a7a - Browse repository at this point
Copy the full SHA 9d18a7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 34c3239 - Browse repository at this point
Copy the full SHA 34c3239View commit details -
Configuration menu - View commit details
-
Copy full SHA for 82d6b5e - Browse repository at this point
Copy the full SHA 82d6b5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ef5b92 - Browse repository at this point
Copy the full SHA 6ef5b92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f00a22 - Browse repository at this point
Copy the full SHA 0f00a22View commit details -
Configuration menu - View commit details
-
Copy full SHA for b747330 - Browse repository at this point
Copy the full SHA b747330View commit details -
Configuration menu - View commit details
-
Copy full SHA for bba5070 - Browse repository at this point
Copy the full SHA bba5070View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.