about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-02-21 06:43:40 +0000
committerbors <bors@rust-lang.org>2020-02-21 06:43:40 +0000
commit01a8b5f26e536a3bcd9449f62fd0b9b68ef3d650 (patch)
treef0a6ed6876169822d95d6d69a8757f1bde3997be /src/libstd/sys/unix/stack_overflow.rs
parent2851e59a52673e0242532035047009c6e121c95a (diff)
parent9f3bc82fe40fd38fadfd24b7968548929abc9d4c (diff)
downloadrust-01a8b5f26e536a3bcd9449f62fd0b9b68ef3d650.tar.gz
rust-01a8b5f26e536a3bcd9449f62fd0b9b68ef3d650.zip
Auto merge of #69290 - wesleywiser:speed_up_ctfe_stress_4, r=RalfJung
Check `RUSTC_CTFE_BACKTRACE` much less by generating fewer errors

Before this change, `get_size_and_align()`  calls `get_fn_alloc()` *a
lot* in CTFE heavy code. This previously returned an `Error` which would
check if `RUSTC_CTFE_BACKTRACE` was set on construction. Doing this
turned out to be a performance hotspot as @nnethercote discovered in
#68792.

This is an alternate take on that PR which resolves the performance
issue by generating *many* fewer errors. Previously, `ctfe-stress-4`
would generate over 5,000,000 errors each of which would check for the
presence of the environment variable. With these changes, that number is
reduced to 30.

r? @RalfJung
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions