The Computer Language
24.11 Benchmarks Game

fasta

First, here are a few naive un-optimised single-thread #8 programs transliterated lowest-common-denominator style into different programming languages from the same original —

  source secs mem gz    
  Intel C #8 4.13 19,440 825    
  C clang #8 4.60 19,772 825    
  C gcc #8 4.62 19,772 825    
  C# .NET #8 11.15 30,052 883    
  Java #8 15.11 77,032 894    
  Go #8 18.27 19,440 838    
  Swift #8 106.65 19,440 833    
  Python 3 #8 259.98 19,312 730    
  PHP #8 265.71 27,768 742    
  Ruby yjit #8 270.10 27,768 678    
  Node.js #8 8 min 62,400 723    
  Java -Xint #8 11 min 107,836 894    
  Dart #8 15 min 19,492 796    
 
 
  Here are the crowd sourced programs —  
 
 
× source secs mem gz cpu secs cpu load
1.0 C gcc #9 0.78 19,772 1469 0.78 0% 1% 0% 100%
1.0 Chapel #6 0.79 19,436 1108 0.80 100% 0% 1% 1%
1.6 C# .NET #9 1.21 29,432 1512 1.21 100% 0% 0% 2%
1.6 C gcc #5 1.24 19,772 1286 1.24 0% 1% 0% 100%
1.6 Julia #2 1.17 234,156 1094 1.25 0% 0% 89% 19%
1.7 Intel Fortran #4 1.34 19,648 1355 1.34 2% 100% 0% 0%
2.0 C++ g++ #9 0.78 19,352 2758 1.54 63% 1% 98% 37%
2.4 C++ g++ #2 1.84 19,760 1129 1.84 1% 0% 0% 100%
2.5 C++ g++ 1.92 19,760 1064 1.92 99% 0% 1% 0%
2.5 Rust #3 1.98 19,804 1235 1.97 0% 99% 0% 0%
3.3 Ada 2012 GNAT #5 2.60 19,772 2220 2.60 1% 0% 100% 0%
3.4 C++ g++ #3 2.63 19,760 1311 2.63 0% 100% 1% 0%
3.4 Ada 2012 GNAT #2 2.64 19,772 2158 2.63 0% 0% 0% 100%
3.4 Julia #5 2.57 250,416 957 2.66 0% 99% 0% 3%
3.5 Julia #4 2.62 236,892 1053 2.72 0% 100% 0% 3%
3.5 C gcc #7 2.76 19,772 1299 2.76 0% 0% 0% 99%
3.6 C gcc #6 0.94 19,772 1936 2.78 100% 97% 96% 1%
3.9 C++ g++ #7 0.87 19,760 2711 3.05 88% 88% 88% 88%
4.0 Rust #2 0.92 19,932 1910 3.09 84% 83% 83% 87%
4.0 Rust #9 0.93 19,352 1952 3.13 88% 84% 83% 84%
4.0 Rust #5 0.94 19,932 1963 3.14 83% 83% 87% 84%
4.2 C gcc #2 0.82 19,772 2276 3.24 100% 100% 98% 100%
4.3 C++ g++ #4 3.32 19,760 1291 3.32 0% 100% 0% 0%
4.3 OCaml #6 3.36 201,984 1194 3.36 0% 0% 100% 0%
4.4 Java  #4 3.28 44,352 1528 3.40 99% 1% 0% 3%
4.4 Rust #6 3.46 123,652 959 3.45 0% 100% 0% 0%
4.6 Rust #4 3.57 123,652 944 3.57 0% 99% 0% 0%
4.7 C++ g++ #5 1.06 19,760 2345 3.66 86% 86% 87% 86%
4.8 C gcc 3.70 19,772 1213 3.70 95% 0% 0% 4%
4.8 Java #6 1.16 49,848 2549 3.71 78% 91% 78% 73%
4.8 Go 3.73 19,808 1055 3.74 0% 0% 0% 100%
4.9 Chapel #5 1.03 19,436 1391 3.78 100% 89% 89% 90%
5.2 C++ g++ #6 1.07 19,760 2326 4.01 94% 95% 94% 95%
5.2 Chapel #3 4.02 19,436 1219 4.03 100% 1% 0% 1%
5.2 F# .NET #3 1.12 64,832 1361 4.03 91% 94% 87% 89%
5.2 Go #2 1.27 19,808 1405 4.06 81% 83% 80% 78%
5.3 Go #3 1.51 19,808 1362 4.09 81% 65% 45% 80%
5.3 Java #5 1.24 49,640 2478 4.13 80% 87% 85% 83%
5.4 Dart #3 4.17 490,192 1114 4.18 0% 98% 0% 1%
5.5 Rust 4.24 19,804 1240 4.24 0% 100% 0% 1%
5.5 Dart #4 4.19 403,212 1307 4.30 0% 98% 1% 2%
5.7 Dart 4.44 19,620 1407 4.44 0% 0% 0% 99%
5.8 Lisp SBCL #6 4.48 19,680 1763 4.48 0% 0% 0% 100%
5.9 Java #2 4.45 48,896 1259 4.60 3% 0% 0% 99%
5.9 C gcc #8 4.62 19,772 825 4.62 0% 1% 0% 100%
6.1 OCaml #3 4.71 19,676 1075 4.71 100% 0% 0% 0%
6.3 Dart #5 3.07 403,208 1489 4.90 1% 58% 4% 97%
6.7 F# .NET #4 1.40 65,484 1355 5.22 96% 92% 92% 95%
6.7 Lisp SBCL #3 5.24 22,912 1592 5.24 0% 0% 0% 100%
7.0 C# .NET #5 1.48 50,620 1702 5.45 91% 93% 89% 95%
7.1 Haskell GHC 5.45 19,804 975 5.54 47% 16% 2% 36%
7.2 Free Pascal #6 5.60 19,636 1196 5.60 100% 0% 0% 1%
7.3 Free Pascal #5 5.65 19,636 1225 5.65 0% 0% 100% 0%
7.5 Intel Fortran 5.83 19,648 1193 5.83 0% 100% 0% 0%
7.9 Intel Fortran #3 6.19 19,648 1217 6.19 0% 100% 0% 0%
8.0 C# .NET 1.70 36,636 2113 6.23 94% 94% 91% 89%
8.7 Haskell GHC #3 6.68 619,208 1091 6.79 0% 9% 1% 90%
8.9 Ada 2012 GNAT 6.93 19,772 1381 6.92 100% 0% 0% 0%
11 Lisp SBCL #2 8.85 23,296 1628 8.84 0% 100% 0% 0%
12 Lisp SBCL 9.02 26,112 1430 9.02 0% 99% 0% 0%
14 C# .NET #8 11.15 30,052 883 11.17 89% 0% 11% 0%
15 Julia #3 11.61 234,416 901 11.70 67% 1% 33% 0%
19 Dart #2 14.46 19,620 1075 14.46 70% 17% 0% 12%
20 Java #8 15.11 77,032 894 15.49 1% 1% 7% 93%
24 Go #8 18.27 19,440 838 18.46 25% 23% 25% 28%
24 Racket 18.49 75,628 1071 18.48 83% 17% 0% 0%
24 Haskell GHC #2 6.60 440,192 1323 18.63 85% 74% 66% 63%
27 Erlang #2 19.29 55,904 1170 21.10 3% 99% 1% 4%
27 PHP #3 21.15 19,804 1065 21.14 40% 60% 0% 0%
31 Lua #3 24.08 19,652 1065 24.08 0% 100% 0% 0%
31 Lua #2 24.15 19,652 1065 24.14 0% 0% 0% 100%
38 PHP #2 29.41 19,804 1054 29.41 0% 0% 100% 0%
39 VW Smalltalk 30.08 55,168 1542 30.07 0% 0% 100% 0%
41 Ruby yjit #6 31.90 120,832 1097 31.90 83% 0% 17% 0%
50 Node.js 38.40 58,880 815 38.77 35% 50% 0% 14%
50 Python 3 #2 39.00 19,312 1126 39.00 95% 0% 0% 4%
50 Python 3 #3 39.12 19,312 1007 39.12 92% 0% 0% 8%
56 Ruby yjit #3 43.90 120,576 1035 43.90 100% 0% 0% 0%
69 Python 3 #5 27.86 827,284 1951 53.94 73% 48% 45% 27%
74 Python 3 57.21 19,312 823 57.20 0% 100% 0% 0%
77 Perl 60.07 55,296 875 60.07 100% 0% 0% 0%
117 Ruby yjit #5 90.76 23,168 1000 90.75 94% 0% 5% 0%
122 Ruby yjit #4 95.10 266,624 864 95.09 0% 100% 0% 0%
136 Ruby yjit #2 106.06 147,176 747 106.05 98% 0% 1% 0%
137 Swift #8 106.65 19,440 833 106.65 0% 0% 0% 100%
162 Perl #4 126.60 19,684 969 125.89 0% 0% 0% 99%
220 Erlang 84.14 55,008 1045 170.84 76% 69% 32% 25%
243 Perl #2 189.89 19,684 926 189.24 0% 99% 0% 0%
334 Python 3 #8 259.98 19,312 730 259.80 0% 99% 0% 0%
341 PHP #8 265.71 27,768 742 265.18 89% 3% 7% 0%
347 Ruby yjit #8 270.10 27,768 678 269.94 99% 0% 0% 0%
415 Matz's Ruby #4 5 min 275,584 864 5 min 97% 2% 0% 0%
469 Matz's Ruby #5 6 min 19,688 1000 6 min 99% 0% 0% 0%
552 Matz's Ruby #2 7 min 248,360 747 7 min 100% 0% 0% 0%
683 Node.js #8 8 min 62,400 723 8 min 42% 47% 5% 4%
  Dart #8 15 min 19,492 796 15 min 48% 48% 2% 1%
C gcc #4 Make Error
Matz's Ruby #3 Failed
Matz's Ruby #6 Failed
Matz's Ruby #8 Bad Output
 
 
  * possible hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu secs cpu load
2.0 * Rust #7 0.77 19,804 2533 1.54 64% 1% 100% 37%
3.6 * Haskell GHC #6 0.86 19,936 1885 2.82 82% 82% 83% 83%
3.7 * Haskell GHC #4 0.86 42,752 2017 2.87 83% 83% 83% 83%
3.8 * Haskell GHC #5 0.93 19,808 2004 2.93 81% 78% 78% 78%
4.8 * Swift #2 2.11 19,440 1952 3.76 22% 80% 74% 4%
6.2 * Julia #6 2.12 353,084 1213 4.86 49% 63% 53% 65%
6.6 * Swift 5.15 19,440 1533 5.14 0% 0% 0% 100%
6.8 * Julia #7 1.87 348,656 1189 5.33 65% 94% 61% 65%
6.9 * Swift #3 2.18 31,248 2097 5.40 74% 62% 74% 38%
9.1 * Node.js #5 2.52 112,392 2050 7.08 48% 74% 78% 84%
10 * Racket #3 8.10 76,680 1291 8.09 0% 100% 0% 0%