-
Notifications
You must be signed in to change notification settings - Fork 13k
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
store ADT information in an AdtDef structure in a unified way #27551
Conversation
@@ -170,7 +170,6 @@ RUST_LIB_FLAGS_ST3 += -C prefer-dynamic | |||
|
|||
# Landing pads require a lot of codegen. We can get through bootstrapping faster | |||
# by not emitting them. | |||
RUSTFLAGS_STAGE0 += -Z no-landing-pads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this slipped in by accident?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
passes check locally |
Fixes rust-lang#27532 Thanks @eefriedman for the test.
Perf numbers: Before this patchset: 572.70user 5.52system 7:33.21elapsed 127%CPU (0avgtext+0avgdata 1173368maxresident)k llvm-time: 385.858 After this patch: 557.84user 5.73system 7:22.10elapsed 127%CPU (0avgtext+0avgdata 1142848maxresident)k llvm-time: 385.834 nice 2.5% perf improvement
Awesome, I'm glad somebody did this. The performance increase is consistent with what I saw with my version of this change. Hopefully this should also make working with ADTs easier going forward, at the very least it's much more obvious. |
Oh, I can believe it, since I wrote them, but I've been migrating code to the following conventions:
|
While technically true, that's not particularly interesting, is it? The intention of these types is as I wrote them, no? I'm fine if you want to note that caveat in a comment, but I still favor names that lay clear the intent of "read-only" vs "mutable", as this is a subtle trick. |
How is this relevant? I'm talking about what module the code is in, not what it does. |
ah, ok, sounds good. |
cc @rust-lang/compiler <-- this PR is worth having more eyes on, incidentally |
OK, I've finished reading through the PR. I am happy with it, this is nice work. r+ modulo:
|
ps, if you prefer, perhaps the name |
addressed |
@bors r+ |
📌 Commit eedb1cc has been approved by |
This ended up being a bigger refactoring than I thought, as I also cleaned a few ugly points in rustc. There are still a few areas that need improvements. Performance numbers: ``` Before: 572.70user 5.52system 7:33.21elapsed 127%CPU (0avgtext+0avgdata 1173368maxresident)k llvm-time: 385.858 After: 545.27user 5.49system 7:10.22elapsed 128%CPU (0avgtext+0avgdata 1145348maxresident)k llvm-time: 387.119 ``` A good 5% perf improvement. Note that after this patch >70% of the time is spent in LLVM - Amdahl's law is in full effect. Passes make check locally. r? @nikomatsakis
This ended up being a bigger refactoring than I thought, as I also cleaned a few ugly points in rustc. There are still a few areas that need improvements.
Performance numbers:
A good 5% perf improvement. Note that after this patch >70% of the time is spent in LLVM - Amdahl's law is in full effect.
Passes make check locally.
r? @nikomatsakis