You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-12Lines changed: 8 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,39 +14,35 @@ The following results are for 123 unique utf-8 Bible text files in 23 languages
14
14
* Machine: MacBook Pro 16" 64GB 2TB M1Max 10 cores.
15
15
16
16
<pre>
17
-
1. Rust 1.58 = 0.38s (with sorting: 1.40s)
18
-
2. Golang 1.17.6 = 0.61s (with sorting: 5.03s)
19
-
3. Python 3.10.2 = 2.80s
17
+
1. Golang 1.17.6 = 0.61s (with sorting: 5.03s)
18
+
2. Rust 1.58 = 1.14s (with sorting: 1.62s) with tokyo (previous: 1.34s, with sorting: 1.79)
19
+
3. Python 3.10.2 = 2.80s (with multiprocessing)
20
20
4. Julia 1.7.1 = 4.522
21
21
5. Crystal 1.3.2 = 5.72s
22
22
6. Elixir 1.13.2 = 7.82s
23
-
7. Ruby 3.1.0 = 8.31s
23
+
7. Ruby 3.1.0 = 8.31s (with Parallel)
24
24
</pre>
25
25
26
26
### Conclusion
27
27
28
-
Rust is the fastest language beyond doubt. The new optimized Golang code version is very fast, slower than Rust but faster than other languages. Golang is the only language at the moment with full mature i18n support for arm64/M1 platform.
29
-
30
-
* Rust = the current example uses [lexical-sort](https://lib.rs/crates/lexical-sort) which is not perfect. [There is no standard mature implementation of i18n in Rust](https://www.arewewebyet.org/topics/i18n/) at the moment.
28
+
The new optimized Golang code version is very fast, slower than Rust but faster than other languages. Golang is the only language at the moment with full mature i18n support for arm64/M1 platform.
31
29
30
+
* Rust = the current example uses [lexical-sort](https://lib.rs/crates/lexical-sort) which is not perfect. [There is no standard mature implementation of i18n in Rust](https://www.arewewebyet.org/topics/i18n/) at the moment.
32
31
33
32
* Python = has a great implementation of [ICU](https://icu.unicode.org/related) library however it does not support arm64/M1 platform, hence I couldn't use it in this comparison.
34
33
35
-
36
34
* Ruby = same as Python, no ICU for M1.
37
35
38
-
39
36
* Elixir = same as Python, no ICU for M1.
40
37
41
-
42
38
* Julia = I couldn't find a good i18 library supporting many languages.
43
39
44
-
45
40
* Crystal = currently supports only Turkish collations. Probably because the language is young and does not have a large enough community or company behind it.
46
41
47
-
48
42
* Golang = has rules for many languages. You can see the influence of a large company and community which makes Golang a mature solution. Sorting slowed the whole task down significantly, but the result is correct (in this case I only checked the results for the Polish language)
49
43
50
44
### Kudos
51
45
52
46
[@romanatnews](https://github.com/romanatnews) (Golang example refactoring)
47
+
48
+
[@pan93412](https://github.com/pan93412) (Rust example refactoring using Tokyo runtime)
0 commit comments