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

Avoid excessive reallocations during item-bodies checking #31929

Merged
merged 1 commit into from
Feb 27, 2016

Commits on Feb 26, 2016

  1. Avoid excessive reallocations during item-bodies checking

    When foldings Substs, we map over VecPerParamSpace instances using
    EnumeratedItems which does not provide an accurate size_hint()
    in its Iterator implementation. This leads to quite a large number or
    reallocations. Providing a suitable size_hint() implementation reduces
    the time spent in item-bodies checking quite a bit.
    
    ```
    crate  | before | after | ~change
    -------|-------------------------
    core   |  7.28s | 5.44s |   -25%
    std    |  2.07s | 1.88s |  -9.2%
    syntax |  8.86s | 8.30s |  -6.3%
    ```
    dotdash committed Feb 26, 2016
    Configuration menu
    Copy the full SHA
    31fef23 View commit details
    Browse the repository at this point in the history