The Computer Language
Benchmarks Game

fasta

We accept something intermediate between chaos and rigidity — enough flex & slop & play to allow for Haskell programs that are not just mechanically translated from Fortran; enough similarity in the basic workloads & tested results.

Programming language advocates and curious programmers have contributed new programs and introduced newer techniques. Look at the slower simple sequential programs, and  look at the parallel programs written for multicore, and  look at the low-level programs written for SIMD. Always look at the source code.

× source secs mem gz busy cpu load
1.0 C++ g++ #7 1.33 1,824 2711 4.31 82% 82% 81% 80%
1.0 C gcc #2 1.36 2,912 2268 5.42 99% 100% 99% 99%
1.1 C gcc #7 1.41 2,852 2011 5.47 100% 96% 96% 96%
1.1 Rust #2 1.47 2,036 1906 4.60 77% 76% 83% 77%
1.1 Rust #5 1.47 2,040 1961 4.59 78% 77% 75% 83%
1.1 C++ g++ #6 1.48 4,540 2324 5.16 89% 86% 88% 87%
1.1 C++ g++ #5 1.48 4,456 2344 5.16 86% 88% 88% 88%
1.2 Chapel #4 1.61 5,812 1398 5.63 99% 83% 84% 83%
1.3 F# .NET Core #3 1.68 99,404 1350 6.16 94% 89% 89% 95%
1.4 Substrate VM #5 1.80 7,120 2473 6.80 94% 93% 98% 93%
1.4 Haskell GHC #5 1.88 8,332 1998 4.80 64% 65% 64% 63%
1.4 Haskell GHC #6 1.92 8,000 1882 4.53 58% 60% 61% 57%
1.5 Haskell GHC #4 1.96 42,956 2013 4.84 59% 63% 63% 62%
1.5 C gcc #6 1.99 2,656 1930 5.58 100% 82% 8% 90%
1.6 Go #3 2.07 2,928 1358 5.84 83% 30% 83% 86%
1.7 Java  #5 2.23 45,156 2473 5.99 51% 62% 59% 97%
1.7 C# .NET Core 2.28 67,552 2098 8.19 95% 89% 89% 87%
1.9 C# .NET Core #3 2.51 67,712 1916 8.42 80% 90% 84% 81%
2.0 Go #2 2.72 10,524 1404 6.52 83% 52% 63% 43%
2.2 C# .NET Core #4 2.94 186,464 1524 9.50 78% 78% 78% 89%
2.3 Swift #2 3.08 8,464 1945 4.76 33% 23% 49% 50%
2.5 Fortran Intel #4 3.34 8 1351 3.65 100% 9% 0% 0%
2.6 Node js #5 3.41 63,804 2047 9.91 74% 75% 81% 61%
2.6 Rust #3 3.48 1,192 1233 3.52 1% 100% 0% 1%
3.0 C gcc #5 3.97 840 1281 4.01 1% 100% 1% 0%
3.1 Ada 2012 GNAT #5 4.11 1,960 2221 4.20 0% 100% 1% 0%
3.1 Ada 2012 GNAT #2 4.13 1,960 2153 4.19 0% 0% 1% 100%
3.1 C++ g++ #3 4.13 1,848 1307 4.20 0% 1% 1% 100%
3.1 C++ g++ #2 4.15 1,784 1127 4.23 0% 1% 100% 1%
3.7 Julia #4 4.85 205,456 1049 5.35 4% 5% 2% 99%
3.8 Java #4 5.06 38,228 1524 5.31 99% 2% 2% 3%
4.4 C++ g++ 5.84 1,852 1057 5.90 0% 100% 1% 0%
4.6 OCaml #6 6.08 197,120 1189 6.17 0% 0% 1% 100%
4.6 C gcc #4 6.09 776 1240 6.34 2% 1% 1% 100%
4.7 C++ g++ #4 6.19 780 1287 6.30 100% 1% 1% 0%
5.0 Substrate VM #4 6.62 3,656 1524 6.69 0% 0% 1% 100%
5.0 Rust 6.63 868 1237 6.72 0% 1% 100% 0%
5.2 C# .NET Core #2 6.91 35,956 1195 10.15 11% 20% 17% 99%
5.3 C gcc 7.03 844 1206 7.17 1% 1% 100% 0%
5.4 Go 7.11 1,444 1053 7.20 1% 100% 0% 0%
5.4 Swift #3 7.13 27,464 2090 20.89 65% 65% 68% 95%
5.4 Rust #6 7.17 123,772 955 7.22 0% 1% 100% 0%
5.4 Rust #4 7.17 123,776 939 7.23 0% 100% 1% 0%
6.1 Lisp SBCL #6 8.08 17,576 1757 8.18 1% 0% 0% 100%
6.2 Java #2 8.17 38,668 1257 8.57 100% 2% 1% 3%
6.3 Dart snapshot 8.39 82,628 1403 8.76 1% 2% 3% 99%
6.5 Dart 8.63 128,924 1403 9.28 99% 2% 2% 5%
6.7 OCaml #3 8.85 2,916 1071 8.95 1% 0% 0% 100%
6.7 F# .NET Core 8.94 37,196 1002 9.03 0% 100% 0% 1%
6.8 F# .NET Core #2 8.97 314,948 1308 17.51 53% 55% 55% 33%
6.8 Chapel #3 8.97 5,428 1210 9.09 100% 1% 1% 0%
6.8 Dart aot 9.06 15,232 1403 9.26 2% 0% 100% 0%
6.9 Node js #4 9.17 37,236 1785 9.44 1% 2% 1% 100%
7.0 TypeScript 9.30 36,580 1229 9.57 2% 81% 19% 1%
7.0 Julia #2 9.33 199,040 1192 9.76 2% 99% 2% 2%
7.2 Haskell GHC 9.50 5,172 969 10.56 2% 4% 5% 100%
7.2 Fortran Intel #3 9.51 8 1215 9.61 1% 1% 0% 100%
7.5 Node js #3 9.96 35,360 1128 10.09 0% 46% 55% 1%
7.7 Substrate VM #2 10.19 11,504 1257 10.30 100% 0% 0% 1%
8.3 Free Pascal #4 10.96 8 1140 11.09 1% 0% 0% 100%
8.4 Lisp SBCL #3 11.10 17,400 1587 11.27 100% 1% 1% 0%
8.4 Ada 2012 GNAT 11.17 1,896 1379 11.33 0% 100% 1% 0%
8.7 Swift 11.54 7,156 1526 11.88 0% 100% 2% 1%
8.7 Fortran Intel 11.57 8 1190 11.71 0% 0% 100% 1%
9.0 Julia #3 11.90 174,584 896 12.31 100% 1% 1% 2%
10 Haskell GHC #3 13.45 647,568 1088 27.27 81% 35% 34% 53%
10 Haskell GHC #2 13.91 445,044 1319 47.01 85% 84% 81% 88%
13 Racket #3 17.70 49,124 1280 36.02 100% 3% 100% 1%
13 Lisp SBCL 17.87 22,556 1424 18.04 1% 0% 100% 0%
14 Lisp SBCL #2 18.14 22,700 1622 18.41 0% 1% 100% 0%
15 Racket CS #3 20.21 80,160 1280 20.39 1% 0% 0% 100%
25 Erlang HiPE #2 32.62 24,844 1164 36.31 74% 5% 6% 26%
26 Racket CS 34.08 82,416 1066 34.29 0% 0% 100% 0%
33 Racket 43.54 44,668 1066 88.64 1% 97% 5% 100%
35 Truffle Ruby #6 45.96 824,440 1069 79.64 32% 54% 60% 28%
36 Node js #2 48.02 564,504 931 56.85 27% 29% 29% 33%
37 VW Smalltalk 48.66 54,640 1539 49.21 0% 100% 0% 1%
39 Lua #3 51.34 3,056 1061 51.87 0% 0% 1% 100%
40 Lua #2 53.56 2,984 1061 54.09 100% 1% 0% 0%
43 PHP #3 56.53 8,072 1062 57.08 0% 0% 1% 100%
48 Python 3 #5 63.10 682,516 1947 142.96 69% 62% 39% 57%
51 Ruby #6 66.96 97,260 1069 106.91 75% 50% 12% 23%
55 Pharo Smalltalk #2 72.29 79,584 1379 73.18 0% 0% 1% 100%
55 Node js 73.15 678,844 809 84.05 37% 21% 27% 30%
59 Truffle Ruby #3 78.09 816,748 1002 113.69 19% 30% 84% 14%
65 Perl 86.24 54,540 871 87.11 0% 100% 1% 0%
69 Truffle Ruby #5 91.67 809,100 995 129.66 64% 20% 40% 18%
71 Ruby #3 93.93 94,460 1002 138.62 47% 18% 24% 59%
72 PHP #2 96.03 8,064 1050 100.09 1% 28% 74% 1%
76 Truffle Ruby #4 100.65 1,191,964 913 153.66 28% 29% 40% 56%
81 Python 3 #2 106.79 7,952 1121 108.02 1% 0% 0% 100%
82 Python 3 #3 108.08 7,976 1003 109.08 0% 100% 1% 0%
86 JRuby #3 114.12 784,484 1002 126.98 4% 13% 79% 15%
102 Python 3 134.53 7,828 817 138.08 1% 1% 100% 1%
104 Erlang HiPE 138.38 24,184 1039 281.71 45% 47% 55% 57%
106 Ruby #4 140.60 220,496 913 189.49 33% 39% 49% 14%
109 Ruby #5 144.15 16,756 995 188.72 32% 38% 26% 35%
131 Pharo Smalltalk 172.93 79,424 1374 179.51 100% 2% 2% 0%
149 Perl #4 197.48 5,536 966 204.90 1% 0% 3% 100%
150 Ruby #2 198.25 212,200 743 242.37 63% 9% 11% 39%
212 Perl #2 281.11 5,616 922 286.99 1% 1% 100% 0%
251 JRuby 5 min 963,160 770 5 min 39% 2% 3% 62%
406 Matz's Ruby #4 8 min 275,620 913 9 min 1% 0% 100% 1%
441 Matz's Ruby #5 9 min 4,344 995 9 min 6% 65% 14% 17%
527 Matz's Ruby #2 11 min 248,184 743 11 min 0% 5% 96% 0%
  Truffle Ruby #2 17 min 1,479,788 743 26 min 38% 43% 37% 31%
Julia Bad Output
Matz's Ruby #3 Failed
Matz's Ruby #6 Failed