diff options
| author | bors <bors@rust-lang.org> | 2016-02-05 13:02:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-05 13:02:26 +0000 |
| commit | 38dfb96b46ab6b9e2bdc384e1d13ac57d1f760d9 (patch) | |
| tree | 0ffd3b14027d8679b7c95da8c5bf0813d949753c /src/libstd/sys/unix/stack_overflow.rs | |
| parent | f12d32d307d53a8f7851ce8dd1b4fbd7a4f0b50a (diff) | |
| parent | 8c0f4f5d3aa6deac4ef8b371bd043f5c1df2c254 (diff) | |
| download | rust-38dfb96b46ab6b9e2bdc384e1d13ac57d1f760d9.tar.gz rust-38dfb96b46ab6b9e2bdc384e1d13ac57d1f760d9.zip | |
Auto merge of #31390 - dotdash:fix_quadratic_drop, r=nagisa
If a new cleanup is added to a cleanup scope, the cached exits for that scope are cleared, so all previous cleanups have to be translated again. In the worst case this means that we get N distinct landing pads where the last one has N cleanups, then N-1 and so on. As new cleanups are to be executed before older ones, we can instead cache the number of already translated cleanups in addition to the block that contains them, and then only translate new ones, if any and then jump to the cached ones, getting away with linear growth instead. For the crate in #31381 this reduces the compile time for an optimized build from >20 minutes (I cancelled the build at that point) to about 11 seconds. Testing a few crates that come with rustc show compile time improvements somewhere between 1 and 8%. The "big" winner being rustc_platform_intrinsics which features code similar to that in #31381. Fixes #31381
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
