diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2016-02-27 00:53:33 +0100 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2016-02-27 00:59:43 +0100 |
| commit | 31fef237b639fac3a1b719110fa0cfad3df44332 (patch) | |
| tree | f4ad64cba631febeb8b57c303fd0bafec953debd /src/libstd/sys/unix/stack_overflow.rs | |
| parent | f59fd4642534e80a61982ce3e10c147d97054212 (diff) | |
| download | rust-31fef237b639fac3a1b719110fa0cfad3df44332.tar.gz rust-31fef237b639fac3a1b719110fa0cfad3df44332.zip | |
Avoid excessive reallocations during item-bodies checking
When foldings Substs, we map over VecPerParamSpace instances using EnumeratedItems which does not provide an accurate size_hint() in its Iterator implementation. This leads to quite a large number or reallocations. Providing a suitable size_hint() implementation reduces the time spent in item-bodies checking quite a bit. ``` crate | before | after | ~change -------|------------------------- core | 7.28s | 5.44s | -25% std | 2.07s | 1.88s | -9.2% syntax | 8.86s | 8.30s | -6.3% ```
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
