rust/library/alloc/src
Jubilee 19d9a147be
Rollup merge of #88452 - xu-cheng:vecdeque-from-array, r=m-ou-se
VecDeque: improve performance for From<[T; N]>

Create `VecDeque` directly from the array instead of inserting items one-by-one.

Benchmark
```
./x.py bench library/alloc --test-args vec_deque::bench_from_array_1000
```

* Before
```
test vec_deque::bench_from_array_1000                    ... bench:       3,991 ns/iter (+/- 717)
```

* After
```
test vec_deque::bench_from_array_1000                    ... bench:         268 ns/iter (+/- 37)
```
2021-10-04 13:58:08 -07:00
..
alloc Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
collections Rollup merge of #88452 - xu-cheng:vecdeque-from-array, r=m-ou-se 2021-10-04 13:58:08 -07:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw_vec Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
rc Re-stabilize Weak::as_ptr &friends for unsized T 2021-01-06 19:30:22 -05:00
sync Rollup merge of #80764 - CAD97:weak-unsized-as-ptr-again, r=RalfJung 2021-01-16 17:29:56 +00:00
vec Rollup merge of #87091 - the8472:more-advance-by-impls, r=joshtriplett 2021-10-04 13:58:07 -07:00
alloc.rs Use Rvalue::ShallowInitBox for box expression 2021-09-25 01:08:41 +01:00
borrow.rs Const Deref 2021-09-15 03:06:53 +00:00
boxed.rs Fix missing no_global_oom_handling cfg-gating 2021-09-17 03:53:18 +01:00
fmt.rs Apply 16 commits (squashed) 2021-09-25 20:04:35 +02:00
lib.rs implement advance_(back_)_by on more iterators 2021-09-30 21:23:28 +02:00
macros.rs Remove alloc/malloc/calloc/realloc doc aliases 2021-06-30 19:59:39 +01:00
raw_vec.rs Fix a typo in raw_vec 2021-08-28 20:20:22 +02:00
rc.rs Auto merge of #89144 - sexxi-goose:insig_stdlib, r=nikomatsakis 2021-09-26 19:36:00 +00:00
slice.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
str.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
string.rs Make diangostic item names consistent 2021-10-02 19:38:19 -05:00
sync.rs Apply 16 commits (squashed) 2021-09-25 20:04:35 +02:00
task.rs Document From implementations for Waker and RawWaker 2021-04-22 14:16:33 -07:00
tests.rs Fix alloc::test::test_show 2021-04-21 15:45:41 +02:00