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

Inline __iterator_get_unchecked for some iterator adapters. #92566

Merged
merged 2 commits into from
May 3, 2022

Commits on May 2, 2022

  1. add benchmark

    the8472 committed May 2, 2022
    Configuration menu
    Copy the full SHA
    e3db41b View commit details
    Browse the repository at this point in the history
  2. This aligns the inline attributes of existing `__iterator_get_uncheck…

    …ed` with those of `next()` on adapters that have both.
    
    It improves the performance of iterators using unchecked access when building in incremental mode
    (due to the larger CGU count?). It might negatively affect incremental compile times for better runtime results,
    but considering that the equivalent `next()` implementations also are `#[inline]` and usually are more complex this
    should be ok.
    
    ```
    ./x.py bench library/core -i --stage 0 --test-args bench_trusted_random_access
    
    OLD: 119,172 ns/iter
    NEW:  17,714 ns/iter
    ```
    the8472 committed May 2, 2022
    Configuration menu
    Copy the full SHA
    a68a5d2 View commit details
    Browse the repository at this point in the history