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 Haskell GHC #6 1.40 7,992 1882 4.15 75% 74% 75% 74%
1.0 Haskell GHC #5 1.44 8,324 2000 4.25 73% 74% 74% 74%
1.0 C++ g++ #7 1.46 2,216 2711 4.40 75% 75% 76% 75%
1.0 C gcc #2 1.46 2,992 2268 5.81 99% 99% 99% 99%
1.1 Haskell GHC #4 1.47 42,464 2013 4.18 71% 71% 71% 72%
1.1 Rust #2 1.51 2,044 1906 4.60 74% 83% 73% 74%
1.1 Rust #5 1.51 2,040 1961 4.74 77% 77% 76% 83%
1.1 C gcc #7 1.53 2,980 2011 5.97 97% 97% 99% 97%
1.2 C# aot #5 1.65 85,868 1691 6.03 88% 91% 98% 88%
1.2 Chapel #4 1.66 5,296 1396 5.97 99% 87% 87% 87%
1.2 F# .NET Core #3 1.70 107,124 1350 6.41 93% 99% 94% 92%
1.2 C# .NET Core #5 1.70 84,508 1691 6.36 95% 92% 90% 98%
1.3 C++ g++ #6 1.77 4,708 2324 5.53 78% 79% 77% 78%
1.4 C gcc #6 2.02 2,472 1930 5.61 88% 8% 81% 100%
1.5 Java OpenJ9 #5 2.06 63,804 2473 5.55 67% 67% 63% 71%
1.5 Go #3 2.08 3,560 1358 5.61 80% 37% 76% 78%
1.5 F# .NET Core #4 2.14 68,096 1342 7.84 91% 98% 89% 88%
1.6 Java  #5 2.22 45,172 2473 5.99 61% 50% 98% 60%
1.7 C# .NET Core 2.37 46,416 2098 8.53 88% 95% 89% 89%
1.7 C# aot 2.38 47,700 2098 8.94 97% 93% 91% 95%
1.9 C# aot #3 2.60 47,236 1916 8.90 82% 95% 82% 83%
1.9 C# .NET Core #3 2.69 46,576 1916 9.13 82% 97% 80% 81%
2.0 Go #2 2.73 11,156 1404 6.56 60% 80% 48% 53%
2.1 C# aot #4 2.90 180,136 1524 9.70 85% 79% 91% 79%
2.1 C# .NET Core #4 2.98 178,300 1524 9.73 76% 80% 79% 91%
2.3 Swift #2 3.22 8,792 1945 4.82 36% 29% 43% 41%
2.4 Fortran Intel #4 3.34 8 1351 3.37 1% 100% 0% 0%
2.4 Node js #5 3.35 61,832 2047 9.40 59% 55% 75% 91%
2.4 Rust #3 3.37 1,200 1233 3.42 58% 42% 1% 1%
2.9 C gcc #5 3.99 912 1281 4.17 1% 2% 100% 1%
2.9 C++ g++ #2 4.10 1,800 1127 4.40 3% 3% 1% 100%
3.0 C++ g++ #3 4.14 1,800 1307 4.32 1% 1% 2% 100%
3.0 Ada 2012 GNAT #5 4.18 1,976 2221 4.22 0% 0% 100% 0%
3.0 Ada 2012 GNAT #2 4.18 1,976 2153 4.21 0% 0% 1% 100%
3.6 Julia #4 5.01 189,584 1049 5.82 2% 12% 99% 3%
3.7 Java #4 5.10 37,316 1524 5.33 3% 20% 80% 2%
3.7 Java OpenJ9 #4 5.19 159,076 1524 5.53 98% 4% 2% 2%
4.2 C++ g++ 5.85 1,800 1057 5.94 0% 100% 1% 1%
4.4 C gcc #4 6.10 844 1240 6.28 100% 2% 0% 1%
4.4 OCaml #6 6.11 202,384 1189 6.22 0% 100% 1% 1%
4.5 C++ g++ #4 6.34 844 1287 6.41 100% 1% 0% 0%
4.8 C# aot #2 6.72 34,584 1195 6.85 1% 1% 100% 0%
4.8 C# .NET Core #2 6.76 33,932 1195 6.88 1% 1% 0% 100%
4.8 Swift #3 6.77 26,712 2090 20.35 73% 75% 68% 85%
4.9 Rust 6.87 940 1237 6.93 0% 0% 0% 100%
5.1 Go 7.08 1,600 1053 7.29 0% 40% 62% 1%
5.1 Rust #4 7.18 123,788 939 7.24 1% 0% 87% 13%
5.1 Rust #6 7.18 123,920 955 7.31 16% 84% 1% 1%
5.3 C gcc 7.46 848 1206 7.70 100% 2% 1% 1%
5.6 Java #2 7.83 38,688 1257 8.15 100% 2% 1% 1%
5.9 Java OpenJ9 #2 8.27 115,172 1257 9.19 1% 3% 8% 99%
6.1 Dart snapshot 8.50 84,788 1403 8.82 1% 2% 99% 1%
6.2 F# .NET Core #2 8.64 291,180 1308 17.03 77% 45% 48% 27%
6.2 Lisp SBCL #6 8.65 18,024 1757 8.73 0% 0% 0% 100%
6.2 OCaml #3 8.70 2,824 1071 8.80 0% 100% 1% 0%
6.3 Chapel #3 8.75 5,572 1217 9.26 100% 2% 2% 2%
6.4 Dart 8.94 119,552 1403 9.55 98% 3% 2% 4%
6.5 Dart exe 9.04 17,476 1403 9.20 100% 1% 0% 1%
6.5 Dart aot 9.04 17,504 1403 9.27 0% 2% 100% 1%
6.6 Node js #4 9.19 36,576 1785 9.35 1% 100% 0% 0%
6.8 F# .NET Core 9.43 34,600 1002 9.61 0% 99% 2% 1%
6.8 Julia #2 9.51 219,940 1192 9.91 100% 2% 1% 1%
6.8 TypeScript 9.54 36,732 1229 9.72 1% 53% 47% 1%
6.8 Fortran Intel #3 9.55 8 1215 9.65 100% 0% 1% 0%
6.9 Haskell GHC 9.58 5,344 969 10.50 4% 100% 4% 1%
7.0 Node js #3 9.83 34,348 1128 9.98 10% 36% 11% 44%
7.3 Free Pascal #5 10.23 8 1220 10.42 100% 1% 1% 0%
7.6 Ada 2012 GNAT 10.63 1,972 1379 10.78 0% 1% 1% 100%
7.6 Lisp SBCL #3 10.67 18,016 1587 10.75 0% 1% 100% 0%
8.1 Fortran Intel 11.32 8 1190 11.45 48% 53% 0% 0%
8.2 Swift 11.51 7,492 1526 11.62 0% 1% 100% 0%
9.9 Haskell GHC #2 13.78 450,080 1319 46.64 81% 90% 83% 85%
10 Haskell GHC #3 13.91 884,396 1088 28.78 56% 70% 44% 37%
13 Racket #3 17.54 38,132 1280 17.78 23% 1% 0% 77%
13 Lisp SBCL 17.82 21,360 1424 17.96 0% 0% 1% 100%
13 Lisp SBCL #2 18.37 18,036 1622 18.54 92% 0% 1% 8%
14 Racket CS #3 19.66 86,264 1280 19.76 0% 0% 0% 100%
24 Julia #3 33.26 179,748 896 34.00 100% 1% 1% 0%
24 Racket CS 33.88 82,604 1066 34.09 95% 1% 0% 5%
31 Racket 43.67 36,804 1066 44.20 1% 83% 17% 1%
31 Node js #2 43.89 536,924 931 47.96 39% 47% 4% 19%
35 VW Smalltalk 48.48 55,160 1539 49.05 0% 16% 84% 1%
35 Erlang HiPE #2 48.54 23,740 1164 53.00 61% 16% 1% 30%
37 Lua #3 51.34 3,056 1061 51.87 0% 0% 1% 100%
38 Lua #2 53.56 2,984 1061 54.09 100% 1% 0% 0%
39 PHP #3 53.82 8,056 1062 54.91 1% 0% 100% 1%
46 Python 3 #5 63.55 844,180 1947 129.71 40% 71% 33% 61%
48 Node js 66.58 648,940 809 71.36 20% 30% 3% 54%
48 Ruby #6 66.96 97,260 1069 106.91 75% 50% 12% 23%
50 Pharo Smalltalk #2 70.05 103,644 1379 70.91 0% 100% 0% 1%
63 PHP #2 88.42 8,072 1050 89.51 0% 0% 100% 1%
65 Perl 90.15 54,920 871 91.86 20% 1% 1% 80%
67 Python 3 #2 93.53 8,368 1121 94.44 76% 0% 0% 25%
67 Ruby #3 93.93 94,460 1002 138.62 47% 18% 24% 59%
68 Python 3 #3 94.45 8,348 1003 95.51 100% 1% 0% 0%
81 JRuby #3 113.02 788,348 1002 126.07 4% 40% 62% 6%
88 Python 3 122.70 8,148 817 125.74 49% 46% 5% 2%
93 Erlang HiPE 129.44 23,840 1039 183.89 100% 23% 19% 0%
101 Ruby #4 140.60 220,496 913 189.49 33% 39% 49% 14%
103 Ruby #5 144.15 16,756 995 188.72 32% 38% 26% 35%
111 Pharo Smalltalk 154.70 103,396 1374 161.65 65% 3% 1% 35%
142 Ruby #2 198.25 212,200 743 242.37 63% 9% 11% 39%
146 Perl #4 203.78 6,140 966 209.93 90% 1% 2% 11%
207 Perl #2 288.98 6,124 922 296.50 1% 2% 100% 1%
228 JRuby 5 min 968,640 770 5 min 34% 22% 16% 34%
385 Matz's Ruby #4 8 min 275,620 913 9 min 1% 0% 100% 1%
419 Matz's Ruby #5 9 min 4,344 995 9 min 6% 65% 14% 17%
500 Matz's Ruby #2 11 min 248,184 743 11 min 0% 5% 96% 0%
C++ g++ #5 Timed Out
Julia Bad Output
Free Pascal #4 Bad Output
Matz's Ruby #3 Failed
Matz's Ruby #6 Failed