-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Commits on Apr 22, 2017
-
remove cleanup branches to the resume block
This improves LLVM performance by 10% lost during the shimmir transition.
Configuration menu - View commit details
-
Copy full SHA for 3bf0045 - Browse repository at this point
Copy the full SHA 3bf0045View commit details -
avoid calling
mk_region
unnecessarilythis improves typeck & trans performance by 1%. This looked hotter on callgrind than it is on a CPU.
Configuration menu - View commit details
-
Copy full SHA for e1377a4 - Browse repository at this point
Copy the full SHA e1377a4View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for acd0e40 - Browse repository at this point
Copy the full SHA acd0e40View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for ece6c84 - Browse repository at this point
Copy the full SHA ece6c84View commit details -
weak_lang_items: check for
lang
attribute before callingvalue_str
improves trans performance by *another* 10%.
Configuration menu - View commit details
-
Copy full SHA for 266d36f - Browse repository at this point
Copy the full SHA 266d36fView commit details -
allocate less strings in
symbol_names
this improves trans performance by *another* 10%.
Configuration menu - View commit details
-
Copy full SHA for 81af6fb - Browse repository at this point
Copy the full SHA 81af6fbView commit details -
this is another one of these things that looks *much* worse on valgrind.
Configuration menu - View commit details
-
Copy full SHA for a0f145b - Browse repository at this point
Copy the full SHA a0f145bView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for a660ad8 - Browse repository at this point
Copy the full SHA a660ad8View commit details