]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Auto merge of #78682 - glandium:issue78471, r=lcnr
authorbors <bors@rust-lang.org>
Tue, 15 Dec 2020 06:32:10 +0000 (06:32 +0000)
committerbors <bors@rust-lang.org>
Tue, 15 Dec 2020 06:32:10 +0000 (06:32 +0000)
commite261649593cf9c2707f7b30a61c46c4469c67ebb
tree4532de1ee4809a9894d5234f1767ed14ed296f44
parente1cce06e4ff5206daf397e1dcf91ed53653be171
parent76bd14548910a13049b59b14e09a80cfd3a29b77
Auto merge of #78682 - glandium:issue78471, r=lcnr

Do not inline finish_grow

Fixes #78471.

Looking at libgkrust.a in Firefox, the sizes for the `gkrust.*.o` file is:
18584816 (text) 582418 (data) with unmodified master
17937659 (text) 582554 (data) with #72227 reverted
17968228 (text) 582858 (data) with `#[inline(never)]` on `grow_amortized` and `grow_exact`, but that has some performance consequences
17927760 (text) 582322 (data) with this change

So in terms of size, at least in the case of Firefox, this patch more than undoes the regression. I don't think it should affect performance, but we'll see.
library/alloc/src/raw_vec.rs
library/alloc/src/vec.rs