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 performance of coherence checks #68966

Merged
merged 4 commits into from
Feb 10, 2020
Merged

Improve performance of coherence checks #68966

merged 4 commits into from
Feb 10, 2020

Commits on Feb 9, 2020

  1. Reduce queries/map lookups done by coherence

    This has negligible perf impact, but it does improve the code a bit.
    
    * Only query the specialization graph of any trait once instead of once per
      impl
    * Loop over impls only once, precomputing impl DefId and TraitRef
    jonas-schievink committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    5ab1ab4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    82d6e79 View commit details
    Browse the repository at this point in the history
  3. Defer error span calculation until needed

    This was showing up in profiles. Also deduplicates the code to get just
    the impl header span.
    jonas-schievink committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    8f468ee View commit details
    Browse the repository at this point in the history
  4. Remove vestigial #43355-compat code

    This was previously a future-compat warning that has since been turned into
    hard error, but without actually removing all the code.
    
    Avoids a call to `traits::overlapping_impls`, which is expensive.
    jonas-schievink committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    2309592 View commit details
    Browse the repository at this point in the history