diff options
| author | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-07-07 13:50:23 +0200 |
|---|---|---|
| committer | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2015-07-08 19:40:40 +0200 |
| commit | 6ac0ba3c3a1fc20e17923724e1e7635131eb19d6 (patch) | |
| tree | 24e01203766715d1e62275c80453cbc4acbf6974 /src/rustllvm/RustWrapper.cpp | |
| parent | 26f0cd5de7f71a0db0bb3857ce49a11cd0f7d876 (diff) | |
| download | rust-6ac0ba3c3a1fc20e17923724e1e7635131eb19d6.tar.gz rust-6ac0ba3c3a1fc20e17923724e1e7635131eb19d6.zip | |
Improve Vec::resize so that it can be used in Read::read_to_end
We needed a more efficient way to zerofill the vector in read_to_end. This to reduce the memory intialization overhead to a minimum. Use the implementation of `std::vec::from_elem` (used for the vec![] macro) for Vec::resize as well. For simple element types like u8, this compiles to memset, so it makes Vec::resize much more efficient.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
