Uh oh!
There was an error while loading. Please reload this page.
Shrink ObligationCauseCode - #64302
Conversation
These are types that get memcpy'd a lot.
The reduction in `memcpy` calls greatly outweighs the cost of the extra allocations, for a net performance win.
The reduction in `memcpy` calls outweighs the cost of the extra allocations, for a net performance win.
rust-highfive
commented
Sep 9, 2019
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
nnethercote
commented
Sep 9, 2019
@bors try |
bors
commented
Sep 9, 2019
Shrink `ObligationCauseCode` These commits reduce the size of `ObligationCauseCode` from 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to less `memcpy`ing.
bors
commented
Sep 9, 2019
☀️ Try build successful - checks-azure |
nnethercote
commented
Sep 9, 2019
@rust-timer build afbe8d9 |
rust-timer
commented
Sep 9, 2019
Success: Queued afbe8d9 with parent 7eb65df, comparison URL. |
rust-timer
commented
Sep 9, 2019
Finished benchmarking try commit afbe8d9, comparison URL. |
nnethercote
commented
Sep 9, 2019
BTW, I tried taking things a step further, by boxing the Also, these results are good, but I might wait a bit before landing. AFAICT, this change causes LLVM to use direct code for |
mati865
commented
Sep 10, 2019
Indeed 128 is the threshold for using libc instead of |
nnethercote
commented
Sep 12, 2019
@zackmdavis: I'm ready to land now, review away :) |
zackmdavis
commented
Sep 14, 2019
@bors r+ |
bors
commented
Sep 14, 2019
📌 Commit 2e3b079 has been approved by |
…ode, r=zackmdavis Shrink `ObligationCauseCode` These commits reduce the size of `ObligationCauseCode` from 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to less `memcpy`ing.
…ode, r=zackmdavis Shrink `ObligationCauseCode` These commits reduce the size of `ObligationCauseCode` from 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to less `memcpy`ing.
…ode, r=zackmdavis Shrink `ObligationCauseCode` These commits reduce the size of `ObligationCauseCode` from 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to less `memcpy`ing.
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
These commits reduce the size of
ObligationCauseCodefrom 56 bytes to 32 bytes on 64-bit. This reduces instruction counts on various benchmarks by up to 1%, due to lessmemcpying.