The Computer Language
22.05 Benchmarks Game

fasta

First a few simple programs.

Then optimisations, multicore parallelism, [pdf] vector parallelism.

Last hand-written vector instructions and "unsafe" programs.

  source secs mem gz    
  Rust #4 3.58 123,860 939    
  Python 3 70.54 8,040 817    
 
 
 
× source secs mem gz cpu cpu load
1.0 C gcc #9 0.78 1,256 1463 0.78 0% 1% 0% 100%
1.0 Chapel #6 0.79 5,524 1104 0.80 100% 3% 0% 1%
1.1 C gcc #2 0.82 2,860 2268 3.25 99% 100% 100% 100%
1.1 C gcc #7 0.85 2,864 2011 3.28 96% 96% 99% 96%
1.2 Rust #2 0.92 2,580 1906 3.18 85% 84% 91% 85%
1.2 Rust #5 0.93 2,580 1961 3.10 82% 82% 82% 88%
1.2 C gcc #6 0.94 2,140 1930 2.76 100% 97% 1% 97%
1.2 Rust #8 0.94 2,596 1946 3.55 92% 100% 94% 93%
1.2 Chapel #5 0.95 6,320 1391 3.46 99% 89% 90% 90%
1.3 C++ g++ #6 1.04 4,564 2324 3.89 94% 94% 93% 93%
1.3 C++ g++ #5 1.05 4,540 2344 3.75 89% 89% 90% 88%
1.5 Julia #8 1.14 198,752 1082 1.40 99% 10% 8% 9%
1.5 F# .NET #3 1.14 79,888 1350 4.13 90% 89% 94% 88%
1.5 Java  #6 1.19 42,416 2543 3.52 73% 81% 64% 76%
1.5 C# .NET #5 1.19 85,788 1691 4.43 92% 94% 92% 96%
1.6 Go #2 1.26 10,980 1404 3.84 71% 70% 82% 80%
1.6 Java #5 1.27 42,532 2473 4.14 77% 76% 94% 79%
1.7 C gcc #5 1.30 1,052 1281 1.30 3% 1% 100% 0%
1.8 C# .NET 1.40 51,376 2098 5.16 94% 92% 90% 94%
1.9 Go #3 1.49 3,168 1358 3.98 55% 53% 77% 77%
2.0 F# .NET #4 1.54 57,276 1342 5.84 94% 95% 95% 95%
2.4 C++ g++ #2 1.85 2,004 1127 1.85 1% 100% 1% 0%
2.5 C++ g++ 1.97 2,000 1057 1.97 1% 1% 99% 2%
2.6 Rust #3 2.03 1,104 1233 2.03 1% 0% 100% 0%
2.7 Classic Fortran #4 2.07 672 1351 2.07 0% 0% 100% 0%
3.3 Ada 2012 GNAT #5 2.57 2,584 2221 2.57 100% 0% 0% 0%
3.4 C++ g++ #3 2.62 1,964 1307 2.62 100% 1% 0% 6%
3.4 Julia #5 2.63 219,876 950 2.89 3% 4% 100% 3%
3.4 Ada 2012 GNAT #2 2.63 2,496 2153 2.63 0% 0% 100% 1%
3.5 C gcc #8 2.75 1,044 1293 2.74 0% 0% 0% 100%
3.7 Julia #4 2.85 203,872 1049 3.12 3% 3% 4% 100%
3.9 C gcc #4 3.07 1,020 1240 3.06 0% 2% 0% 100%
4.3 OCaml #6 3.31 203,384 1189 3.31 0% 0% 0% 100%
4.3 Java #4 3.36 36,800 1524 3.41 1% 1% 99% 1%
4.3 C++ g++ #4 3.36 1,016 1287 3.36 0% 1% 0% 100%
4.6 Rust #4 3.58 123,860 939 3.57 100% 0% 1% 0%
4.6 Rust #6 3.58 123,848 955 3.58 0% 1% 100% 4%
4.7 Go 3.63 1,112 1053 3.64 100% 0% 2% 0%
4.7 C gcc 3.68 1,016 1206 3.67 1% 0% 0% 100%
5.3 Chapel #3 4.13 5,316 1229 4.12 100% 1% 0% 0%
5.4 Dart 4.21 17,616 1402 4.21 0% 100% 0% 1%
5.5 Lisp SBCL #6 4.30 23,504 1757 4.30 0% 0% 0% 100%
5.6 Dart #5 4.35 250,648 1485 7.79 53% 0% 72% 54%
5.7 Java #2 4.40 36,812 1257 4.46 3% 1% 1% 99%
5.7 Rust 4.45 1,100 1237 4.45 100% 0% 0% 0%
5.8 C gcc #3 4.49 972 819 4.49 1% 0% 100% 0%
6.0 OCaml #3 4.66 2,828 1071 4.65 0% 0% 100% 0%
6.8 Haskell GHC #2 5.31 431,104 1319 16.27 71% 84% 72% 77%
7.2 Free Pascal #6 5.59 8 1190 5.58 0% 100% 1% 0%
7.2 Free Pascal #5 5.64 8 1220 5.64 0% 100% 1% 1%
7.7 Lisp SBCL #3 5.99 26,632 1587 5.99 3% 1% 100% 1%
8.0 Ada 2012 GNAT 6.24 2,528 1379 6.24 100% 0% 0% 0%
8.2 Classic Fortran #3 6.36 1,404 1215 6.36 1% 1% 0% 100%
8.7 Classic Fortran 6.80 1,400 1190 6.80 1% 0% 0% 100%
9.2 Dart #4 7.13 255,076 1303 7.42 4% 1% 99% 1%
9.2 Dart #3 7.15 180,480 1108 7.16 1% 1% 0% 99%
12 Lisp SBCL #2 9.33 26,640 1622 9.33 100% 1% 0% 2%
12 Lisp SBCL 9.47 28,980 1424 9.47 0% 100% 0% 2%
20 Dart #2 15.33 18,688 1068 15.33 100% 0% 0% 1%
24 Racket 18.92 66,768 1066 18.91 0% 100% 1% 0%
26 Erlang #2 20.28 38,076 1164 22.40 100% 2% 4% 2%
27 PHP #3 21.01 12,448 1062 20.99 0% 0% 100% 0%
34 Lua #3 26.72 2,808 1061 26.72 98% 3% 0% 0%
35 Lua #2 27.00 2,812 1061 27.00 100% 0% 0% 0%
35 Ruby #6 27.25 340,624 1069 27.24 0% 0% 100% 0%
35 Julia #3 27.51 237,412 896 27.78 100% 0% 1% 0%
37 PHP #2 28.68 12,696 1050 28.67 0% 100% 1% 0%
39 VW Smalltalk 30.50 55,916 1539 30.49 0% 0% 0% 100%
47 Node js 36.71 50,304 809 37.60 1% 1% 82% 18%
49 Python 3 #5 38.39 837,684 1947 71.74 60% 71% 33% 25%
65 Erlang 50.50 38,116 1039 79.11 47% 12% 64% 30%
65 Ruby #3 50.90 337,560 1002 50.87 0% 100% 0% 0%
77 Python 3 #2 60.29 8,184 1121 60.26 0% 0% 0% 100%
78 Python 3 #3 60.51 8,112 1003 60.50 0% 100% 0% 0%
80 Perl 62.43 55,124 871 62.41 0% 100% 0% 0%
91 Python 3 70.54 8,040 817 70.54 0% 100% 0% 0%
125 Ruby #4 97.62 541,176 860 97.62 0% 0% 0% 100%
127 Ruby #5 98.72 286,228 995 98.69 0% 100% 0% 0%
166 Perl #4 129.34 6,336 966 129.28 100% 1% 0% 0%
198 Ruby #2 153.90 480,812 743 153.89 1% 0% 0% 100%
255 Perl #2 198.46 6,224 922 198.31 1% 0% 100% 1%
343 Matz's Ruby #3 266.99 101,684 1020 266.85 33% 3% 3% 71%
388 Matz's Ruby #4 5 min 277,768 860 5 min 2% 1% 1% 100%
439 Matz's Ruby #5 5 min 4,308 995 5 min 1% 1% 100% 1%
512 Matz's Ruby #2 6 min 248,288 743 6 min 85% 2% 18% 2%
C++ g++ #7 Make Error
Haskell GHC #5 Make Error
Haskell GHC Make Error
Haskell GHC #3 Make Error
Matz's Ruby #6 Failed
 
 
  hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu cpu load
1.0 Rust #7 0.76 2,052 2529 1.52 37% 64% 99% 0%
1.0 C++ g++ #8 0.77 2,720 2751 1.52 1% 99% 100% 0%
1.1 Haskell GHC #4 0.85 41,512 2013 2.74 81% 80% 82% 80%
1.1 Haskell GHC #6 0.87 8,332 1882 3.31 94% 94% 94% 95%
1.8 Swift #3 1.40 26,916 2090 4.64 78% 77% 80% 96%
2.2 Julia #7 1.74 459,380 1182 4.92 59% 67% 87% 71%
2.5 Node js #5 1.96 101,844 2047 6.38 79% 78% 80% 87%
2.5 Julia #6 1.98 407,228 1203 5.54 85% 66% 66% 63%
2.8 Swift #2 2.22 7,440 1945 3.17 18% 8% 32% 72%
5.8 Swift 4.52 6,908 1526 4.52 0% 0% 100% 0%
10 Racket #3 7.99 66,908 1280 7.99 100% 1% 0% 2%