@@ -4,50 +4,56 @@ Example of text file parsing in Python, Golang, Elixir, Rust, Crystal and Julia
44
55Text source: 79.4MB in 30 files
66
7- - Rust 1.51.0 (parallel) with sorting: 2s , without sorting: 1s
7+ - Rust 1.51.0 (parallel) with sorting: 0.91s , without sorting: 0.49s
88- Python 3.9.5 (parallel) with sorting: 3.42s, without sorting: 2.47
9- - Crystal 1.0.0 (parallel) with sorting: 5.78s , withouts sorting: 2.48
9+ - Crystal 1.0.0 (parallel) with sorting: 5.34s , withouts sorting: 2.48
1010- Go 1.16.4 (parallel) with sorting: 6.41s, without sorting: 3.75s
1111- Rust 1.51.0 with sorting: 7s, without sorting: 5s (no parallelism)
12+ - Julia 1.6.1 (8 threads) 8.7s, (1 thread) 9.7s without sorting
1213- Python 3.9.5 with sorting: 10s, without sorting 8.32s (no parallelism)
13- - Julia 1.6.1 (8 threads) 9s, (1 thread) 10.3s without sorting
1414- Crystal 1.0.0 with sorting: 13s, without sorting: 7s (no parallelism)
1515- Go 1.16.4 with sorting: 21s, without sorting: 11s (no parallelism)
1616- Elixir 1.12 (parallel) with sorting: 33s (without release build)
1717
1818macOS 11.3.1, MacBook Pro (Retina, 15-inch, Late 2013)
1919
2020Python
21+
2122``` bash
2223cd words_extractor_py
2324python words.py
2425```
2526
2627Rust
28+
2729```
2830cd words_extractor_rs
2931cargo build --release
3032target/release/words_extractor_rs
3133
3234Golang
3335```
36+
3437cd words_extractor_go
3538make build
3639GOGC=2000 ./main
3740
3841Crystal
42+
3943```
4044cd words_extractor_cr
4145crystal build --release -Dpreview_mt src/fast_words_cr.cr -o main
4246CRYSTAL_WORKES=8 ./main
4347```
4448
4549Julia
50+
4651```
47- JULIA_NUM_THREADS=8 julia src/words_extractor_jl.jl
52+ julia -t 8 src/words_extractor_jl.jl
4853```
4954
5055Elixir
56+
5157```
5258cd words_extractor_ex
5359mix run -e "WordsExtractor.run"
0 commit comments