about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-01 18:43:41 +0000
committerbors <bors@rust-lang.org>2018-07-01 18:43:41 +0000
commita2be769fd50403a07c45677f8f285491c8e90d74 (patch)
tree898d003c54271e6be9ca89de25668091d9f3336d /src/rustllvm/PassWrapper.cpp
parent6af9f91a170d33550e8f5922cdb728384ec9c7eb (diff)
parent46512e09c9f97a68a36e2d72e3be766b1e76a1a0 (diff)
downloadrust-a2be769fd50403a07c45677f8f285491c8e90d74.tar.gz
rust-a2be769fd50403a07c45677f8f285491c8e90d74.zip
Auto merge of #51833 - wesleywiser:faster_large_constant_arrays, r=oli-obk
Speed up compilation of large constant arrays

This is a different approach to #51672 as suggested by @oli-obk. Rather
than write each repeated value one-by-one, we write the first one and
then copy its value directly into the remaining memory.

With this change, the [toy program](https://github.com/rust-lang/rust/blob/c2f4744d2db4e162df824d0bd0b093ba4b351545/src/test/run-pass/mir_heavy_promoted.rs) goes from 63 seconds to 19 seconds on my machine.

Edit: Inlining `Size::bytes()` saves an additional 6 seconds dropping the total time to 13 seconds on my machine.

Edit2: Now down to 2.8 seconds.

r? @oli-obk

cc @nnethercote @eddyb
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions