Add VecDeque::extend from TrustedLen specialization#98004
Add VecDeque::extend from TrustedLen specialization#98004bors merged 3 commits intorust-lang:masterfrom
Conversation
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
a121840 to
f6a0c4c
Compare
|
The new code path probably changes what's covered by existing tests, so it would be good to update them to make sure that both the default and the specialized paths are exercised. |
588e1d2 to
d7f449f
Compare
the8472
left a comment
There was a problem hiding this comment.
Looks good except for a few minor style things
d7f449f to
e1065b7
Compare
e1065b7 to
f06dac6
Compare
This comment has been minimized.
This comment has been minimized.
f06dac6 to
ce3b6f5
Compare
|
@bors r+ |
|
📌 Commit ce3b6f5 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (2cec687): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Continuation of #95904
Inspired by how
VecDeque::copy_sliceworks.Benchmarks
Before
After
Why do it this way
https://rust.godbolt.org/z/15qY1fMYh
The Compiler Explorer example shows how "just" removing the capacity check, like the
VecTrustedLenspecialization does, wouldn't have been enough forVecDeque.wrap_addwould still have greatly limited what LLVM could do while optimizing.r? @the8472