Uh oh!
There was an error while loading. Please reload this page.
Box DiagnosticBuilder. - #64374
Conversation
rust-highfive
commented
Sep 11, 2019
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
nnethercote
commented
Sep 11, 2019
@bors try |
bors
commented
Sep 11, 2019
⌛ Trying commit 176bc8cb4c66adfbd2c4220ecf2f8718119e6ae1 with merge 10e8cb29dd1ac7824382d27c5b6e62eedaa42431... |
Centril
commented
Sep 11, 2019
Is there a process by which you selected these specific cases to do the boxing? |
nnethercote
commented
Sep 11, 2019
My strategy was "gotta box 'em all", because there's not much point only boxing some, and if you did, there isn't an obvious dividing line between boxed and non-boxed. Boxing within |
Centril
commented
Sep 11, 2019
The main reason I would prefer to do an internal change is to make the developer UX better so that that "doing the wrong thing" is not possible here. I think I'd personally forget about your PR after a while and forget to do the manual boxing so not having to think about it would be neat. cc also @estebank |
petrochenkov
commented
Sep 11, 2019
Why is it memcpy'ed in the first place? Is it something that is supposed to be addressed by RVO, which rustc doesn't always do when it should right now? |
rust-highfive
commented
Sep 11, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Mark-Simulacrum
commented
Sep 11, 2019
Indeed, and I would actually look at boxing the |
bors
commented
Sep 11, 2019
☀️ Try build successful - checks-azure |
It's a large type -- 176 bytes on 64-bit. And it's passed around and returned from a lot of functions, including within PResult. This commit boxes it, which reduces memory traffic. In particular, `PResult` shrinks to 16 bytes in the best case; this reduces instruction counts by up to 2% on various workloads.
176bc8c to
2fcd870CompareI have updated the code to use an internal box. It made the patch much less invasive -- thanks for the suggestion, @Centril. I don't know why RVO isn't being applied. I just go where the profiler tells me to, and it told me that lots of I also fixed the mingw failure. @bors try |
bors
commented
Sep 11, 2019
⌛ Trying commit 2fcd870 with merge 25dba6526006eb8d4c2da901bcf74f00b4ed6383... |
bors
commented
Sep 12, 2019
Box `DiagnosticBuilder`. It's a large type -- 176 bytes on 64-bit. And it's passed around and returned from a lot of functions, including within `PResult`. This commit boxes it, which reduces memory traffic. In particular, `PResult` shrinks to 16 bytes in the best case; this reduces instruction counts by up to 2% on various workloads. The commit touches a lot of lines but it's almost all trivial plumbing changes.
bors
commented
Sep 12, 2019
☀️ Try build successful - checks-azure |
nnethercote
commented
Sep 12, 2019
@rust-timer build f81c392 |
rust-timer
commented
Sep 12, 2019
Success: Queued f81c392 with parent f0b58fc, comparison URL. |
rust-timer
commented
Sep 12, 2019
Finished benchmarking try commit f81c392, comparison URL. |
nnethercote
commented
Sep 12, 2019
The perf results look good, reducing instruction counts by up to 2.6%. |
zackmdavis
commented
Sep 14, 2019
Great! 💖 @bors r+ |
bors
commented
Sep 14, 2019
📌 Commit 2fcd870 has been approved by |
…r=zackmdavis Box `DiagnosticBuilder`. It's a large type -- 176 bytes on 64-bit. And it's passed around and returned from a lot of functions, including within `PResult`. This commit boxes it, which reduces memory traffic. In particular, `PResult` shrinks to 16 bytes in the best case; this reduces instruction counts by up to 2% on various workloads. The commit touches a lot of lines but it's almost all trivial plumbing changes.
…r=zackmdavis Box `DiagnosticBuilder`. It's a large type -- 176 bytes on 64-bit. And it's passed around and returned from a lot of functions, including within `PResult`. This commit boxes it, which reduces memory traffic. In particular, `PResult` shrinks to 16 bytes in the best case; this reduces instruction counts by up to 2% on various workloads. The commit touches a lot of lines but it's almost all trivial plumbing changes.
…r=zackmdavis Box `DiagnosticBuilder`. It's a large type -- 176 bytes on 64-bit. And it's passed around and returned from a lot of functions, including within `PResult`. This commit boxes it, which reduces memory traffic. In particular, `PResult` shrinks to 16 bytes in the best case; this reduces instruction counts by up to 2% on various workloads. The commit touches a lot of lines but it's almost all trivial plumbing changes.
Rollup of 17 pull requests Successful merges: - #63846 (Added table containing the system calls used by Instant and SystemTime.) - #64116 (Fix minor typo in docs.) - #64203 (A few cosmetic improvements to code & comments in liballoc and libcore) - #64302 (Shrink `ObligationCauseCode`) - #64372 (use randSecure and randABytes) - #64374 (Box `DiagnosticBuilder`.) - #64375 (Fast path for vec.clear/truncate ) - #64378 (Fix inconsistent link formatting.) - #64384 (Trim rustc-workspace-hack) - #64393 ( declare EnvKey before use to fix build error) - #64420 (Inline `mark_neighbours_as_waiting_from`.) - #64422 (Remove raw string literal quotes from error index descriptions) - #64423 (Add self to .mailmap) - #64425 (typo fix) - #64431 (fn ptr is structural match) - #64435 (codegen: use "_N" (like for other locals) instead of "argN", for argument names.) - #64439 (fix#64430, confusing `owned_box` error message in no_std build) Failed merges: r? @ghost
It's a large type -- 176 bytes on 64-bit. And it's passed around and
returned from a lot of functions, including within
PResult.This commit boxes it, which reduces memory traffic. In particular,
PResultshrinks to 16 bytes in the best case; this reduces instructioncounts by up to 2% on various workloads. The commit touches a lot of
lines but it's almost all trivial plumbing changes.