]> git.lizzy.rs Git - rust.git/commit
Right-size the `VecDeque` in `coerce_unsized`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 22 May 2018 06:51:28 +0000 (16:51 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Tue, 22 May 2018 09:55:48 +0000 (19:55 +1000)
commita86544b799b0fe81e2e2a734a2b49d16faad4f3d
tree92771ffa1435e5489e4f1e4ba1b38a6588c7bd32
parent4c26e2e3fba61f18caca8bd43c57e1f1d799f07b
Right-size the `VecDeque` in `coerce_unsized`.

The default capacity of a VecDeque is 8, which is excessive here. In a
"base incremental" check build of rustc-perf's tuple-stress benchmark,
this decreases total heap allocation by 26%. I couldn't see a clear
speedup, but it can't hurt.
src/librustc_typeck/check/coercion.rs