about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-28 09:27:21 +0000
committerbors <bors@rust-lang.org>2022-04-28 09:27:21 +0000
commit3bfeffd55bbc7d653d2df7ad265746bafe595a96 (patch)
tree5153d315469d8f0471d83c73e272089c99b84e78 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent71cd460616dcefd9249aa6c4ddd4c84ba1d2c476 (diff)
parentc126f7fc8bf9e2abc0cac1fae40d04f4cf21e4d0 (diff)
downloadrust-3bfeffd55bbc7d653d2df7ad265746bafe595a96.tar.gz
rust-3bfeffd55bbc7d653d2df7ad265746bafe595a96.zip
Auto merge of #95904 - paolobarbolini:vecdeque-specextend, r=the8472
Add VecDeque::extend from vec::IntoIter and slice::Iter specializations

Inspired from the [`Vec` `SpecExtend` implementation](https://github.com/rust-lang/rust/blob/027a232755fa9728e9699337267f6675dfd0a8ba/library/alloc/src/vec/spec_extend.rs), but without the specialization for `TrustedLen` which I'll look into in the future.

Should help #95632 and https://github.com/KillingSpark/zstd-rs/pull/17

## Benchmarks

Before

```
test vec_deque::bench_extend_bytes    ... bench:         862 ns/iter (+/- 10)
test vec_deque::bench_extend_vec      ... bench:         883 ns/iter (+/- 19)
```

After

```
test vec_deque::bench_extend_bytes    ... bench:           8 ns/iter (+/- 0)
test vec_deque::bench_extend_vec      ... bench:          24 ns/iter (+/- 1)

```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions