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

LNS: Work-around lns::generic_owner hashing bug in rpc #1095

Merged
merged 2 commits into from Mar 26, 2020

Commits on Mar 24, 2020

  1. Copy the full SHA
    271a09a View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2020

  1. Change std::map<lns::generic_owner -> unordered_map

    Quoting from Jagerman's reason: With the std::hash specialization
    already here, an unordered_map here seems an obviously better choice:
    hash collisions won't be destructive (they are with std::map + hash as
    keys), the code is slightly simpler (you can eliminate the hash call),
    and performance is better (map is an insertion sorted container, thus
    O(NlogN) on N insertions).
    
    This isn't just an optimal data structure thing: using a map here has
    a potential (if rare) data omission on collision.
    Doy-lee committed Mar 26, 2020
    Copy the full SHA
    175f56a View commit details
    Browse the repository at this point in the history