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

Implementation of Robin Hood hashing for AWS C Common #17

Merged
merged 27 commits into from
Mar 8, 2018
Merged

Conversation

marcomagdy
Copy link
Contributor

@marcomagdy marcomagdy commented Mar 7, 2018

Description of changes:
This is based off of the original PR by @bdonlan #13.
Changes from the PR include:

  • Compile on MSVC
  • Fix inline asm bug using early clobbers for the operands
  • Add a preprocessor to disable inline assembly
  • Fix benign issues that were flagged by cppcheck

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Bryan Donlan and others added 16 commits March 5, 2018 13:57
Without this, we endup with unused function errors because we attempt to
compile .c files that are meant for inclusion within other .c files.
cmov is not always available on 32bit machines, and also benchmarking
cmove against jnc yields no significant difference; in fact,
in some cases (clang compiles) it resulted in faster code.

Removing the #ifdef for cmov allows us to test the 32bit code on 64bit
machines used by developers and CI. Which avoids surprise errors like
the compile error of "label redefinition" which I also fixed in this commit.
@marcomagdy marcomagdy merged commit 45e3aef into master Mar 8, 2018
@bretambrose bretambrose deleted the hashtbl branch December 17, 2019 22:25
graebm added a commit that referenced this pull request Nov 27, 2024
**Issue**
A recent PR #1170 (comment) fixed an indexing-math bug in this test. When I took a closer look at this test, I noticed it was broken ... and didn't make much sense

**Research:**
This hash table test was added with the original hash table PR #17.

That branch had 2 different authors, which seems to have led to the brokenness
- Original [commit](c2a7f08) with this test
- In this [commit](ab4e987), author B accidentally replaces floating-point-rand with integer-rand, breaking randomness so this test doesn't actually test anything anymore
- In this [commit](fe71f05), Author A removes some `entries[i -1]` checks that don't really make sense because `entries` isn't sorted
- In this [commit](a36d2dd), Author B brings the checks back. My guess is there was a merge conflict and they just accepted their own side

**Description of changes**
- Fix randomness
- Add comments about what this test is doing
- Fix the checks, using the `sorted_entries` array instead of the unsorted `entries` array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants