Skip to content

Commit b83011e

Browse files
committed
Auto merge of #141039 - lqd:expensive-sanity, r=compiler-errors
move expensive layout sanity check to debug assertions It is [hard to fix](rust-lang/rust#141006 (comment)) 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](rust-lang/rust#141039 (comment)) 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.`
2 parents d1d10b1 + f521fd2 commit b83011e

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)