Skip to content

optimize: ContainesHash method adopts fast failure#12

Open
imalasong wants to merge 1 commit intoholiman:masterfrom
imalasong:pr/1
Open

optimize: ContainesHash method adopts fast failure#12
imalasong wants to merge 1 commit intoholiman:masterfrom
imalasong:pr/1

Conversation

@imalasong
Copy link
Copy Markdown

When determining whether to include an element, as long as any bit does not match, it can be determined that the element does not exist. I think this quick failure method should improve performance

Copy link
Copy Markdown

@eltNEG eltNEG left a comment

Choose a reason for hiding this comment

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

@holiman This change looks good. Please consider merging it.

Copy link
Copy Markdown
Owner

@holiman holiman left a comment

Choose a reason for hiding this comment

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

This change adds a conditional inside a tight loop. Please demonstrate (via benchmark) that it's an improvement in speed

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.

3 participants