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

Optimization in is_full() #36

Closed
leventov opened this issue Dec 6, 2018 · 1 comment
Closed

Optimization in is_full() #36

leventov opened this issue Dec 6, 2018 · 1 comment

Comments

@leventov
Copy link

leventov commented Dec 6, 2018

https://github.com/Amanieu/hashbrown/blob/63aa152cfd3b3690b69c3f8afd14f4904edb38cf/src/raw/mod.rs#L54-L56

(ctrl as i8) >= 0 might be faster because might benefit the sign bit already set (if LLVM doesn't perform this optimization automatically).

@Amanieu
Copy link
Member

Amanieu commented Dec 6, 2018

LLVM seems to generate the same assembly code in both cases.

@Amanieu Amanieu closed this as completed Dec 9, 2018
This issue was closed.
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

No branches or pull requests

2 participants