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

Improve the slice iterator's searching methods #37972

Merged
merged 3 commits into from
Jan 18, 2017

Commits on Nov 24, 2016

  1. core: Convert utility macros for the slice iterator into a trait

    Use an extension trait for the slice iterator's pointer manipulations.
    bluss committed Nov 24, 2016
    Configuration menu
    Copy the full SHA
    c1db77e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7611e42 View commit details
    Browse the repository at this point in the history
  3. core: Unroll the loop in the slice iterator search methods

    Introduce a helper method .search_while() that generalizes internal
    iteration (Iterator's all, find, position, fold and so on).
    
    The compiler does not unroll loops with conditional exits; we can do
    this manually instead to improve the performance of for example
    Iterator::find and Iterator::position when used on the slice iterators.
    
    The unrolling is patterned on libstdc++'s implementation of std::find_if.
    bluss committed Nov 24, 2016
    Configuration menu
    Copy the full SHA
    a54ddfb View commit details
    Browse the repository at this point in the history