rust/src/libstd/sys
bors ec99b220fe Auto merge of #50772 - nicokoch:fastcopy, r=alexcrichton
fs: copy: use copy_file_range on Linux

Linux 4.5 introduced a new system call [copy_file_range](http://man7.org/linux/man-pages/man2/copy_file_range.2.html) to copy data from one file to another.

This PR uses the new system call (if available). This has several advantages:

1. No need to constantly copy data from userspace to kernel space, if the buffer is small or the file is large
2. On some filesystems, like BTRFS, the kernel can leverage internal fs mechanisms for huge performance gains
3. Filesystems on the network dont need to copy data between the host and the client machine (they have to in the current read/write implementation)

I have created a small library that also implements the new system call for some huge performance gains here: https://github.com/nicokoch/fastcopy
Benchmark results are in the README
2018-05-29 23:49:11 +00:00
..
cloudabi std: Minimize size of panicking on wasm 2018-04-13 07:03:00 -07:00
redox use fmt::Result where applicable 2018-05-09 02:01:37 +02:00
unix Auto merge of #50772 - nicokoch:fastcopy, r=alexcrichton 2018-05-29 23:49:11 +00:00
wasm std: Minimize size of panicking on wasm 2018-04-13 07:03:00 -07:00
windows Rollup merge of #49829 - ecstatic-morse:os-docs, r=steveklabnik 2018-04-24 11:57:03 +08:00
mod.rs Make the documentation build work on CloudABI. 2018-01-11 11:29:52 +01:00