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

Use branchless binary search to find_min_version #28

Merged
merged 1 commit into from
Jul 6, 2019
Merged

Use branchless binary search to find_min_version #28

merged 1 commit into from
Jul 6, 2019

Conversation

pickfire
Copy link
Contributor

@pickfire pickfire commented Jul 6, 2019

Constant search time and no unpredictable conditional branches
Benchmark results: 39 ns/iter -> 2 ns/iter (including multiple call)

Based on rust-lang/rust#45333
Inspired by https://raw.github.com/RustStudy/rust_daily_news/master/img/%E4%BA%8C%E7%BB%B4%E7%A0%81%E7%94%9F%E6%88%90.png

Constant search time and no unpredictable conditional branches
Benchmark results: 39 ns/iter -> 2 ns/iter (including multiple call)

Based on rust-lang/rust#45333
Inspired by https://raw.github.com/RustStudy/rust_daily_news/master/img/%E4%BA%8C%E7%BB%B4%E7%A0%81%E7%94%9F%E6%88%90.png
@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 93.5% when pulling 81404ac on pickfire:branchless into a585403 on kennytm:master.

@kennytm
Copy link
Owner

kennytm commented Jul 6, 2019

Thanks!

@kennytm kennytm merged commit 8ee1918 into kennytm:master Jul 6, 2019
@pickfire pickfire deleted the branchless branch July 7, 2019 14:41
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