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

Implement XxxAssign operations on HashSets #529

Merged
merged 9 commits into from
Jun 18, 2024

Commits on Jun 17, 2024

  1. Remove A: Allocator generics bound from BitOr and BitAnd impl

    BitXor and Sub already don't have them, and its not like we guarantee
    returning a set with the same A type anyway.
    I would be fine with adding it to BitXor and Sub instead, but I think it
    should be consistent.
    ToMe25 committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    f67749f View commit details
    Browse the repository at this point in the history
  2. Implement Add<&HashSet<T, S>> for &HashSet<T, S>

    This is functionally the same as BitOr, but imo its more intuitive if it
    exists because of the Sub impl
    ToMe25 committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    caea18d View commit details
    Browse the repository at this point in the history
  3. Implement XxxAssign operations for HashSets

    Also add a set of benchmarks for set operations
    ToMe25 committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    6e0aec2 View commit details
    Browse the repository at this point in the history
  4. Improve large set - small set performance

    Also remove S: Default bound on Assign ops
    ToMe25 committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    28982b9 View commit details
    Browse the repository at this point in the history
  5. Minor XOR optimization

    The performance benefit is honestly within margin of error, so it might
    be better to undo this in favor of the previous simpler implementation.
    ToMe25 committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    fcb964b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    599bb39 View commit details
    Browse the repository at this point in the history
  7. Move benchmark set creation to separate function

    To make testing with different elements easier
    ToMe25 committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    2d289cc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    025b2ab View commit details
    Browse the repository at this point in the history
  9. Make non-assigning set ops return a set with the same type of allocator

    This requires for the allocator to implement Default
    ToMe25 committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    481ef39 View commit details
    Browse the repository at this point in the history