about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorTyson Nottingham <tgnottingham@gmail.com>2021-02-03 18:41:30 -0800
committerTyson Nottingham <tgnottingham@gmail.com>2021-02-03 18:55:05 -0800
commit29711d8c96ace61f2d240837e392f49a6dd6c8fd (patch)
treecf049890b348d3dd0067eecc6efa6e8cef23ab33 /library/std/src/sys/unix/stack_overflow.rs
parente708cbd91c9cae4426d69270248362b423324556 (diff)
downloadrust-29711d8c96ace61f2d240837e392f49a6dd6c8fd.tar.gz
rust-29711d8c96ace61f2d240837e392f49a6dd6c8fd.zip
rustc_codegen_ssa: tune codegen scheduling to reduce memory usage
For better throughput during parallel processing by LLVM, we used to sort
CGUs largest to smallest. This would lead to better thread utilization
by, for example, preventing a large CGU from being processed last and
having only one LLVM thread working while the rest remained idle.

However, this strategy would lead to high memory usage, as it meant the
LLVM-IR for all of the largest CGUs would be resident in memory at once.

Instead, we can compromise by ordering CGUs such that the largest and
smallest are first, second largest and smallest are next, etc. If there
are large size variations, this can reduce memory usage significantly.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions