store ADT information in an AdtDef structure in a unified way#27551
store ADT information in an AdtDef structure in a unified way#27551bors merged 14 commits intorust-lang:masterfrom
Conversation
mk/main.mk
Outdated
There was a problem hiding this comment.
I assume this slipped in by accident?
|
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