diff options
| author | bors <bors@rust-lang.org> | 2016-10-15 01:48:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-15 01:48:42 -0700 |
| commit | 030bc49bb44834e691fd67452b39b438fa6d826d (patch) | |
| tree | 1469eadc56fdd6dc35eb8d05521776ca33cfd788 /src/liballoc_jemalloc | |
| parent | e1b67776dbb65e4ad256d27d9d215c643a4df57b (diff) | |
| parent | 63ee8d0bbc9911ee121ed4af4f7e81cbd600d8b1 (diff) | |
| download | rust-030bc49bb44834e691fd67452b39b438fa6d826d.tar.gz rust-030bc49bb44834e691fd67452b39b438fa6d826d.zip | |
Auto merge of #37094 - fhartwig:spec-extend-from-slice, r=alexcrichton
Specialize Vec::extend to Vec::extend_from_slice I tried using the existing `SpecExtend` as a helper trait for this, but the instances would always conflict with the instances higher up in the file, so I created a new helper trait. Benchmarking `extend` vs `extend_from_slice` with an slice of 1000 `u64`s gives the following results: ``` before: running 2 tests test tests::bench_extend_from_slice ... bench: 166 ns/iter (+/- 78) test tests::bench_extend_trait ... bench: 1,187 ns/iter (+/- 697) after: running 2 tests test tests::bench_extend_from_slice ... bench: 149 ns/iter (+/- 87) test tests::bench_extend_trait ... bench: 138 ns/iter (+/- 70) ```
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions
