diff options
| author | bors <bors@rust-lang.org> | 2025-05-18 01:30:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-18 01:30:48 +0000 |
| commit | ac17c3486c6fdfbb0c3c18b99f3d8dfbff625d29 (patch) | |
| tree | 4e23d1445a8e2bdc6cfa759d5cd0add8ae4b26a2 /compiler/rustc_macros/src/query.rs | |
| parent | 16244bc37a6ff610daa38afcddfc1a8bb226702e (diff) | |
| parent | 102cc2f8835c2ca73ca9a20172e3c6dda0e4d139 (diff) | |
| download | rust-ac17c3486c6fdfbb0c3c18b99f3d8dfbff625d29.tar.gz rust-ac17c3486c6fdfbb0c3c18b99f3d8dfbff625d29.zip | |
Auto merge of #141039 - lqd:expensive-sanity, r=compiler-errors
move expensive layout sanity check to debug assertions It is [hard to fix](https://github.com/rust-lang/rust/issues/141006#issuecomment-2883415000) the slowness in the uninhabitedness computation for very big types but we can fix the very specific case of them being called during the layout sanity checks, as described in #140944. So this PR moves this uninhabitedness check to the other expensive layout sanity checks that are ran under `debug_assertions`. It makes building the `lemmy_api_routes` crate's self-profile `layout_of` query go from ``` +--------------------------------------------------------+-----------+-----------------+----------+------------+---------------------------------+ | Item | Self time | % of total time | Time | Item count | Incremental result hashing time | +--------------------------------------------------------+-----------+-----------------+----------+------------+---------------------------------+ | layout_of | 63.02s | 41.895 | 244.26s | 123703 | 50.30ms | +--------------------------------------------------------+-----------+-----------------+----------+------------+---------------------------------+ ``` on master (2m17s total), to ``` | layout_of | 330.21ms | 0.372 | 26.90s | 123703 | 53.19ms | ``` with this PR (1m15s total). (Note that the [perf run results](https://github.com/rust-lang/rust/pull/141039#issuecomment-2884688756) below look a bit better than [an earlier run](https://perf.rust-lang.org/compare.html?start=4eca99a18eab3d4e28ed1ce3ee620d442955a470&end=c4a00993f8ee02c7565e7be652608817ea2fb97d&stat=instructions:u) I did in another PR. There may be some positive noise there, or post-merge results could differ a bit) Since we discussed this today, r? `@compiler-errors` — and cc `@lcnr` and `@RalfJung.`
Diffstat (limited to 'compiler/rustc_macros/src/query.rs')
0 files changed, 0 insertions, 0 deletions
