Show HN: A wc rewrite in Rust that makes it over 100 times faster

CallMeAlphabet1 pts0 comments

GitHub - CallMeAlphabet/fastwc: fastwc — a fast wc rewrite · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

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

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

CallMeAlphabet

fastwc

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>9 Commits<br>9 Commits

src

src

Cargo.toml

Cargo.toml

LICENSE

LICENSE

README.md

README.md

View all files

Repository files navigation

fastwc

fastwc — a fast wc rewrite

Table of Contents

Quick Start

Benchmarks

Uninstall

Usage

Testing Conditions

Quick Start

# Install<br>cargo install --git https://github.com/CallMeAlphabet/fastwc

Note : Make sure ~/.cargo/bin is in your PATH. It's added automatically by rustup, but if fastwc isn't found, add this to your shell config file:

# If you use Bash:<br>export PATH="$HOME/.cargo/bin:$PATH"

# If you use Fish:<br>fish_add_path $HOME/.cargo/bin

# If you use Zsh:<br>export PATH="$PATH:$HOME/.cargo/bin"

# Use it!<br>fastwc /path/to/file

Benchmarks

Benchmark 1: 1.5 GiB file

Tool<br>Time<br>Speed vs fastwc

fastwc<br>0.16s<br>1x (baseline)

wc<br>23s<br>141.6x slower

The gains in speed are higher the bigger the file.

Uninstall

cargo uninstall fastwc

Usage

fastwc does not add any additional flags to the original wc. All flags are the same and behave the same. The --help message was changed though.

Testing Conditions

https://gist.github.com/CallMeAlphabet/4b7022c4b1a8849e6943526de6a23582

About

fastwc — a fast wc rewrite

Resources

Readme

License

GPL-3.0 license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

Rust<br>100.0%

You can’t perform that action at this time.

fastwc cargo reload path search file

Related Articles