about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorKyle Huey <khuey@kylehuey.com>2017-12-03 20:45:12 -0800
committerKyle Huey <khuey@kylehuey.com>2017-12-03 20:45:12 -0800
commit02c1862fb55c6ae4198038b1b317bcdd06e395d1 (patch)
tree3dc542449e75d299a09217a504cae3b3e6f0aef1 /src/libstd/sys/unix/stack_overflow.rs
parentf2b11f30b2946119c23594bc2b3bec3c38d3ae9a (diff)
downloadrust-02c1862fb55c6ae4198038b1b317bcdd06e395d1.tar.gz
rust-02c1862fb55c6ae4198038b1b317bcdd06e395d1.zip
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