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 Haskell GHC #6 1.43 7,900 1882 4.25 76% 76% 73% 73%
1.1 Haskell GHC #5 1.47 8,708 2000 4.33 73% 74% 75% 73%
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.1 Haskell GHC #4 1.51 43,448 2013 4.29 71% 71% 71% 71%
1.1 Rust #5 1.51 2,036 1961 4.60 83% 74% 73% 75%
1.1 Rust #2 1.51 2,032 1906 4.63 75% 75% 83% 73%
1.2 Chapel #4 1.57 5,512 1396 5.60 99% 86% 85% 86%
1.3 F# .NET Core #3 1.70 107,124 1350 6.41 93% 99% 94% 92%
1.5 C gcc #6 1.99 2,656 1930 5.58 100% 82% 8% 90%
1.5 Java OpenJ9 #5 2.05 61,944 2473 5.54 61% 92% 61% 57%
1.6 Go #3 2.07 3,568 1358 5.67 80% 75% 40% 79%
1.6 F# .NET Core #4 2.14 68,096 1342 7.84 91% 98% 89% 88%
1.7 Java  #5 2.24 44,876 2473 6.13 18% 79% 79% 97%
1.8 C# .NET Core 2.37 46,416 2098 8.53 88% 95% 89% 89%
2.0 C# .NET Core #3 2.69 46,576 1916 9.13 82% 97% 80% 81%
2.1 Go #2 2.72 11,164 1404 6.55 47% 50% 45% 98%
2.3 C# .NET Core #4 2.98 178,300 1524 9.73 76% 80% 79% 91%
2.3 Swift #2 3.11 8,680 1945 4.71 45% 48% 16% 43%
2.5 Fortran Intel #4 3.34 8 1351 3.41 1% 100% 1% 0%
2.5 Rust #3 3.35 1,196 1233 3.39 100% 0% 1% 0%
2.5 Node js #5 3.35 61,832 2047 9.40 59% 55% 75% 91%
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.93 215,044 1049 5.36 3% 3% 99% 3%
3.8 Java #4 5.09 37,360 1524 5.31 100% 2% 1% 2%
3.9 Java OpenJ9 #4 5.19 150,452 1524 6.27 18% 98% 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.1 Swift #3 6.74 26,580 2090 20.38 71% 68% 87% 76%
5.1 C# .NET Core #2 6.76 33,932 1195 6.88 1% 1% 0% 100%
5.1 Rust 6.78 872 1237 6.86 0% 0% 1% 100%
5.3 C gcc 7.03 844 1206 7.17 1% 1% 100% 0%
5.3 Go 7.08 1,600 1053 7.26 100% 1% 1% 1%
5.5 Rust #6 7.28 123,860 955 7.36 0% 0% 100% 1%
5.5 Rust #4 7.28 123,932 939 7.33 0% 1% 100% 0%
6.0 Java #2 7.90 38,992 1257 13.46 33% 100% 14% 24%
6.1 Lisp SBCL #6 8.08 17,576 1757 8.18 1% 0% 0% 100%
6.3 Java OpenJ9 #2 8.34 115,248 1257 9.24 99% 1% 9% 1%
6.5 F# .NET Core #2 8.64 291,180 1308 17.03 77% 45% 48% 27%
6.7 OCaml #3 8.85 2,916 1071 8.95 1% 0% 0% 100%
6.8 Dart 8.98 128,660 1403 9.74 82% 2% 3% 21%
6.9 Chapel #3 9.14 5,448 1217 9.20 100% 0% 1% 0%
6.9 Dart snapshot 9.17 84,888 1403 9.51 1% 99% 2% 1%
6.9 Node js #4 9.19 36,576 1785 9.35 1% 100% 0% 0%
7.1 Fortran Intel #3 9.40 8 1215 9.49 0% 0% 0% 100%
7.1 F# .NET Core 9.43 34,600 1002 9.61 0% 99% 2% 1%
7.2 TypeScript 9.54 36,732 1229 9.72 1% 53% 47% 1%
7.2 Julia #2 9.55 216,392 1192 10.12 4% 97% 3% 2%
7.2 Haskell GHC 9.55 5,192 969 10.29 3% 3% 2% 100%
7.2 Dart aot 9.56 18,224 1403 9.80 1% 1% 100% 0%
7.4 Node js #3 9.83 34,348 1128 9.98 10% 36% 11% 44%
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.50 7,296 1526 11.63 0% 100% 1% 1%
8.8 Fortran Intel 11.60 8 1190 11.68 0% 0% 0% 100%
9.0 Julia #3 11.91 180,652 896 12.42 1% 1% 4% 98%
10 Haskell GHC #3 13.85 883,316 1088 28.75 35% 37% 82% 55%
11 Haskell GHC #2 13.93 449,940 1319 47.42 79% 79% 86% 96%
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%
33 Node js #2 43.89 536,924 931 47.96 39% 47% 4% 19%
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%
50 Python 3 #5 66.22 843,344 1947 141.79 87% 13% 47% 66%
50 Node js 66.58 648,940 809 71.36 20% 30% 3% 54%
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%
65 Perl 86.24 54,540 871 87.11 0% 100% 1% 0%
71 Ruby #3 93.93 94,460 1002 138.62 47% 18% 24% 59%
71 Python 3 #3 94.61 8,376 1003 95.53 0% 100% 1% 0%
72 Python 3 #2 95.13 8,416 1121 95.75 0% 100% 0% 0%
72 PHP #2 96.03 8,064 1050 100.09 1% 28% 74% 1%
86 JRuby #3 114.12 784,484 1002 126.98 4% 13% 79% 15%
93 Python 3 123.20 8,020 817 129.12 1% 3% 3% 98%
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%
Julia Bad Output
Matz's Ruby #3 Failed
Matz's Ruby #6 Failed