Use SmallVector in CombineFields::instantiate.#37322
Conversation
|
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
|
We are going to have a "better" |
|
How soon? Is there a PR? I have some other patches in the pipeline that convert |
|
There's #37270 and its |
|
@arielb1 It's not general purpose though. This one is also weird because the libsyntax thing is specifically geared towards |
|
I have filed #37371 for generalizing |
There was a problem hiding this comment.
Could you add a comment about the fact that the common case is one element?
This avoids 4% of malloc calls when compiling rustc-benchmarks/issue-32278-big-array-of-strings, and 1--2% for other benchmarks. A small win, but an easy one.
678bdd6 to
9270a92
Compare
|
@bors r+ Thanks! |
|
📌 Commit 9270a92 has been approved by |
Use `SmallVector` in `CombineFields::instantiate`. This avoids 4% of malloc calls when compiling rustc-benchmarks/issue-32278-big-array-of-strings, and 1--2% for other benchmarks. A small win, but an easy one.
This avoids 4% of malloc calls when compiling
rustc-benchmarks/issue-32278-big-array-of-strings, and 1--2% for other
benchmarks. A small win, but an easy one.