peterwmwong / 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 26.6%Language:Shell 12.0%Language:C 8.6%Language:Go 8.2%Language:Java 6.8%Language:Forth 6.8%Language:C# 5.8%Language:Python 5.8%Language:C++ 3.3%Language:Nim 2.6%Language:JavaScript 2.5%Language:F# 1.9%Language:Zig 1.7%Language:Lua 1.6%Language:D 1.4%Language:OCaml 1.1%Language:Ruby 0.7%Language:Perl 0.5%Language:PHP 0.4%Language:Julia 0.4%Language:Kotlin 0.4%Language:Swift 0.4%Language:Awk 0.4%Language:Crystal 0.3%