diff options
| author | bors <bors@rust-lang.org> | 2017-12-04 10:02:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-04 10:02:48 +0000 |
| commit | c16f480fa6eb6b28f51c7218347bcaf1377dedea (patch) | |
| tree | 3a209104c80c17b525a626b0c80d72a3ecd3a56d /src/libstd/sys/unix/stack_overflow.rs | |
| parent | fdfbcf85d55da97ed1a00823510b876018047aaf (diff) | |
| parent | 02c1862fb55c6ae4198038b1b317bcdd06e395d1 (diff) | |
| download | rust-c16f480fa6eb6b28f51c7218347bcaf1377dedea.tar.gz rust-c16f480fa6eb6b28f51c7218347bcaf1377dedea.zip | |
Auto merge of #46485 - khuey:cursor-read_exact, r=Manishearth
Add a specialization of read_exact for Cursor. The read_exact implementation for &[u8] is optimized and usually allows LLVM to reduce a read_exact call for small numbers of bytes to a bounds check and a register load instead of a generic memcpy. On a workload I have that decompresses, deserializes (via bincode), and processes some data, this leads to a 40% speedup by essentially eliminating the deserialization overhead entirely.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
