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

Make arrays and ranges hash and compare equal #16401

Merged
merged 11 commits into from
Dec 21, 2017
Merged

Make arrays and ranges hash and compare equal #16401

merged 11 commits into from
Dec 21, 2017

Commits on Dec 21, 2017

  1. 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.
    nalimilan committed Dec 21, 2017
    Configuration menu
    Copy the full SHA
    abc8d5b View commit details
    Browse the repository at this point in the history
  2. Remove unneeded calls to collect() when comparing ranges with arrays

    Ranges can now be tested for equality directly against arrays.
    nalimilan committed Dec 21, 2017
    Configuration menu
    Copy the full SHA
    c02f66a View commit details
    Browse the repository at this point in the history
  3. Use another strategy

    nalimilan committed Dec 21, 2017
    Configuration menu
    Copy the full SHA
    a0a44b8 View commit details
    Browse the repository at this point in the history
  4. Rebase fixes

    nalimilan committed Dec 21, 2017
    Configuration menu
    Copy the full SHA
    1a67101 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d18a7a View commit details
    Browse the repository at this point in the history
  6. tmp

    nalimilan committed Dec 21, 2017
    Configuration menu
    Copy the full SHA
    34c3239 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    82d6b5e View commit details
    Browse the repository at this point in the history
  8. Improve code logic

    nalimilan committed Dec 21, 2017
    Configuration menu
    Copy the full SHA
    6ef5b92 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0f00a22 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b747330 View commit details
    Browse the repository at this point in the history
  11. Use a single loop

    nalimilan committed Dec 21, 2017
    Configuration menu
    Copy the full SHA
    bba5070 View commit details
    Browse the repository at this point in the history