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

Fibhash trick #123

Closed
wants to merge 1 commit into from
Closed

Fibhash trick #123

wants to merge 1 commit into from

Conversation

SkBlaz
Copy link
Collaborator

@SkBlaz SkBlaz commented Nov 13, 2023

Seems to work, ripe for first reviews. Rationale here. Ignoring some tests for now fyi

Copy link
Collaborator

@bbenshalom bbenshalom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests need to be unignored when you're ready to merge this

@@ -334,6 +335,21 @@ impl FeatureBufferTranslator {
}
}
}

// rehash part
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this comment to explain that this is an implementation of fibhash and a add link to documentation

@@ -334,6 +335,21 @@ impl FeatureBufferTranslator {
}
}
}

// rehash part
for fb_el in self.feature_buffer.ffm_buffer.iter_mut() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and the next loop can be merged into one

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 342 & 349 are different. If you can zip it with those 2 values, you can ignore the repeating if check you can indeed merge them. Although an if here shouldn't have that large of an impact

@SkBlaz SkBlaz closed this Dec 5, 2023
Copy link
Collaborator

@yonatankarni yonatankarni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand - this comes in addition to the FNV hash, it doesn't replace it?

@SkBlaz
Copy link
Collaborator Author

SkBlaz commented Dec 6, 2023 via email

@yonatankarni
Copy link
Collaborator

yonatankarni commented Dec 6, 2023 via email

@SkBlaz
Copy link
Collaborator Author

SkBlaz commented Dec 6, 2023 via email

@yonatankarni
Copy link
Collaborator

yonatankarni commented Dec 6, 2023 via email

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.

4 participants