diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-06-18 14:52:59 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-06-19 09:37:26 +1000 |
| commit | 8c7433a3ccf80b38270b3e29bf37fe58c1796d2a (patch) | |
| tree | 84c390224cc1ecd27a24191e4f51162f9c6a8b4d /src/test/incremental/thinlto | |
| parent | 2b973e653257f965e33a61b58c0eb7e863aed6c8 (diff) | |
| download | rust-8c7433a3ccf80b38270b3e29bf37fe58c1796d2a.tar.gz rust-8c7433a3ccf80b38270b3e29bf37fe58c1796d2a.zip | |
Avoid allocations in `has_any_child_of`.
`has_any_child_of` is hot. It allocates a `Vec` that almost always doesn't exceed a length of 1. This patch peels off the first iteration of the loop, avoiding the need for the `Vec` creation in ~99% of cases.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
