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

Optimize BitIter #65425

Merged
merged 2 commits into from
Oct 16, 2019
Merged

Optimize BitIter #65425

merged 2 commits into from
Oct 16, 2019

Commits on Oct 15, 2019

  1. Add BitIter::new().

    This factors out some duplicated code.
    nnethercote committed Oct 15, 2019
    Configuration menu
    Copy the full SHA
    2918a7d View commit details
    Browse the repository at this point in the history
  2. Optimize BitSet iteration.

    This commit removes an `Option` check in `BitIter::next()`, avoids
    calling `trailing_zeros()` when it's not necessary, and avoids the need
    for `enumerate()`. This gives a tiny (0.2%) instruction count win on a
    couple of benchmarks.
    
    The commit also adds some comments, which is good because this iteration
    code is moderately complex.
    nnethercote committed Oct 15, 2019
    Configuration menu
    Copy the full SHA
    60851b0 View commit details
    Browse the repository at this point in the history