Refactor and fix allocFirst with buckets for RubyHash#5278
Merged
eregon merged 8 commits intojruby:masterfrom Aug 28, 2018
Merged
Refactor and fix allocFirst with buckets for RubyHash#5278eregon merged 8 commits intojruby:masterfrom
eregon merged 8 commits intojruby:masterfrom
Conversation
Member
|
@ChrisBr This all looked good at a glance but there are epic amounts of OOME in the travis build. Could that be related to these changes or is travis acting up? |
Contributor
Author
Likely 🤔 I will have a look at it tonight |
4b85450 to
8bcb10e
Compare
Contributor
Author
|
Ok, I dropped a few suspicious commits, let's see if this solves it. I will after this PR is merged subsequently create new PRs with the dropped commits. |
8bcb10e to
49ce96e
Compare
to use the next biggest power of two for the hash size. This is necessary because otherwise the secondHashFunction might not be a generator and we do not iterate of all buckets. It is a requirement for the secondaryHash function that buckets length is a power of two.
to DRY the code.
to make updateStartAndEndPointer more readable.
to make code more readable.
it is not necessary to have an if/else we can just move the pointers up / down until we find an existing key.
49ce96e to
6d44f80
Compare
ahorek
reviewed
Aug 28, 2018
| } | ||
| } | ||
|
|
||
| private final int nextPowOfTwo(final int i) { |
Member
|
Let's merge this, CI is green (except just one failure of ruby/spec which I will tag). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.