diff options
| author | kennytm <kennytm@gmail.com> | 2018-04-05 16:51:21 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-05 16:51:21 +0800 |
| commit | 23689cc8e9a6d2c1e6b5f01c749714194bf8f653 (patch) | |
| tree | 22a19854fded32e819ad80b3d430be7e970f5636 /src/liballoc_system | |
| parent | 19c69082f5b0e5b44fe660b6bdd73ea8ac60b6b0 (diff) | |
| parent | 0df837f79289819f9b671b67d4e63dfe5c80d419 (diff) | |
| download | rust-23689cc8e9a6d2c1e6b5f01c749714194bf8f653.tar.gz rust-23689cc8e9a6d2c1e6b5f01c749714194bf8f653.zip | |
Rollup merge of #49496 - glandium:master, r=sfackler
Add more vec![... ; n] optimizations vec![0; n], via implementations of SpecFromElem, has an optimization that uses with_capacity_zeroed instead of with_capacity, which will use calloc instead of malloc, and avoid an extra memset. This PR adds the same optimization for ptr::null, ptr::null_mut, and None, when their in-memory representation is zeroes.
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions
