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

Performance audit, Spring 2017 #41469

Merged
merged 8 commits into from
Apr 22, 2017
Merged

Commits on Apr 22, 2017

  1. remove cleanup branches to the resume block

    This improves LLVM performance by 10% lost during the shimmir transition.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    3bf0045 View commit details
    Browse the repository at this point in the history
  2. avoid calling mk_region unnecessarily

    this improves typeck & trans performance by 1%. This looked hotter on
    callgrind than it is on a CPU.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    e1377a4 View commit details
    Browse the repository at this point in the history
  3. short-cut SharedCrateContext::layout_of

    That method is *incredibly* hot, so this ends up saving 10% of trans
    time.
    
    BTW, we really should be doing dependency tracking there - and possibly be
    taking the respective perf hit (got to find a way to make DTMs fast), but
    `layout_cache` is a non-dep-tracking map.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    acd0e40 View commit details
    Browse the repository at this point in the history
  4. cache attributes of items from foreign crates

    this avoids parsing item attributes on each call to `item_attrs`, which takes
    off 33% (!) of translation time and 50% (!) of trans-item collection time.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    ece6c84 View commit details
    Browse the repository at this point in the history
  5. weak_lang_items: check for lang attribute before calling value_str

    improves trans performance by *another* 10%.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    266d36f View commit details
    Browse the repository at this point in the history
  6. allocate less strings in symbol_names

    this improves trans performance by *another* 10%.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    81af6fb View commit details
    Browse the repository at this point in the history
  7. add a cache to impl_polarity

    this is another one of these things that looks *much* worse on valgrind.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    a0f145b View commit details
    Browse the repository at this point in the history
  8. bail out of selection when there are multiple surviving candidates

    In some cases (e.g. <[int-var] as Add<[int-var]>>), selection can turn up
    a large number of candidates. Bailing out early avoids O(n^2) performance.
    
    This improves item-type checking time by quite a bit, resulting in ~2% of total
    time-to-typeck.
    Ariel Ben-Yehuda authored and arielb1 committed Apr 22, 2017
    Configuration menu
    Copy the full SHA
    a660ad8 View commit details
    Browse the repository at this point in the history