Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/fcatPublic

A 3x faster implementation of cat, using splice

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

mre/fcat

Repository files navigation

Github Actions

fastcat logo

fcat, short forfastcat, is acat implementation in Rust using Linux'ssplice syscall.
With that little trick, it'smore than three times as fast as the systemcat in our benchmarks.
Read theannouncement here.

⚠️This project is currently broken on newer Linux versions (5.9+) because of some changes
concerning thesplice system call. (Seehere andhere.) This can't be fixed unless changes to the kernel get made.

Performance

cat myfile | pv -r > /dev/null[1.90GiB/s]
fcat myfile | pv -r > /dev/null[5.90GiB/s]

Installation

Note: Only works on Linux.
(But you can send me a pull request for other operating systems.)

cargo install fcat

Usage

fcat file1 file2 file3

Project goals

  • Be the fastest cat in town.
  • Be a drop-in replacement for (POSIX) cat.

Non-goals

  • Provide any additional functionality other than whatcat provides.
    If you're looking for a morebeautiful cat, check outbat.

Known issues

If you runfcat /dev/zero >> myfile, it will fail with exit codeEINVAL because, according to thesplice manpage: "The target file is opened in append mode."

Trivia

  • You probably won't ever need this, but it's a fun little experiment.
    Still, I wonder why this is not part of e.g. GNU cat...
  • What I like the most about the project is the logo.

License

fcat is licensed under either of

at your option.

About

A 3x faster implementation of cat, using splice

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp