about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-12-04 10:02:48 +0000
committerbors <bors@rust-lang.org>2017-12-04 10:02:48 +0000
commitc16f480fa6eb6b28f51c7218347bcaf1377dedea (patch)
tree3a209104c80c17b525a626b0c80d72a3ecd3a56d /src/libstd/sys/unix/stack_overflow.rs
parentfdfbcf85d55da97ed1a00823510b876018047aaf (diff)
parent02c1862fb55c6ae4198038b1b317bcdd06e395d1 (diff)
downloadrust-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