erikbozic / countwords

Playing with counting word frequencies (and performance) in various languages.

Home Page:https://benhoyt.com/writings/count-words/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playing with counting word frequencies (and the performance thereof) in various languages. See the full article for context and background: https://benhoyt.com/writings/count-words/

To run the tests and benchmarks (you'll need Go, Rust, Python 3, AWK and perhaps other tools installed). Only tested on Linux:

./test.sh
./benchmark.py

For the latest results (run on my machine), see the article's performance results section.

Thanks to these contributors for additional language versions:

See other versions on Rosetta Code.

About

Playing with counting word frequencies (and performance) in various languages.

https://benhoyt.com/writings/count-words/

License:MIT License


Languages

Language:Rust 30.2%Language:Shell 12.6%Language:Go 10.1%Language:C 9.8%Language:Forth 7.7%Language:C# 6.6%Language:Python 6.2%Language:C++ 3.6%Language:JavaScript 2.4%Language:F# 2.2%Language:Lua 1.8%Language:D 1.6%Language:OCaml 0.9%Language:Ruby 0.8%Language:Perl 0.6%Language:Nim 0.6%Language:PHP 0.5%Language:Julia 0.5%Language:Kotlin 0.4%Language:Swift 0.4%Language:Awk 0.4%Language:Crystal 0.3%