/fastcat

A faster "cat" implementation using splice and sendfile system calls

Primary LanguageCMIT LicenseMIT

fastcat

fastcat is an implementation of cat(1) that uses Linux-specific system calls splice and sendfile to write to stdout. In situations where stdout is piped, splice is used; in all other cases, sendfile is used. The combination of these calls avoids unnecessary copying to userspace.

One unfortunate side effect is that

$ fastcat FILE >> OUT

is not supported as neither splice nor sendfile support appending to files.

Benchmarking

bench is a powerful alternative to the time command, and fastcat uses it for benchmarking.

$ make bench

License

fastcat is released under the MIT License. Use of this source code is governed by a MIT License that can be found in the LICENSE file.