The Computer Language
24.11 Benchmarks Game

k-nucleotide

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    
  Java #8 78.46 2,083,000 786    
  Java OpenJ9 #8 92.25 1,237,708 786    
  Swift #8 181.50 627,328 658    
  Python 3 #8 238.78 623,448 525    
  Dart #8 9 min 524,768 676    
  Ruby yjit #8 13 min 572,736 529    
 
 
  Here are the crowd sourced programs —  
 
 
× source secs mem gz cpu secs cpu load
1.0 C++ g++ #2 2.01 156,592 1634 5.98 73% 90% 68% 67%
1.4 Rust #7 2.84 133,840 1585 8.91 88% 72% 89% 64%
1.5 Rust #6 2.96 159,600 1697 10.67 87% 86% 88% 98%
1.6 C# .NET 3.18 181,724 2046 10.77 89% 72% 90% 88%
1.8 Rust #3 3.52 137,568 1549 10.78 90% 75% 50% 91%
1.8 F# .NET #6 3.71 188,232 1913 11.97 81% 94% 66% 81%
1.9 C gcc 3.84 130,408 1512 12.45 90% 78% 97% 59%
2.0 Rust #5 3.96 137,844 1745 11.95 91% 71% 48% 91%
2.1 C++ g++ #3 4.19 165,580 1280 13.94 79% 76% 81% 97%
2.3 F# .NET #5 4.62 202,244 1964 15.77 78% 76% 96% 90%
2.4 F# .NET #2 4.79 202,524 1932 16.18 95% 77% 75% 90%
2.4 Java  4.92 427,448 1821 15.77 73% 86% 85% 76%
2.5 Chapel #4 4.97 191,872 1071 17.19 99% 82% 82% 82%
2.8 C# .NET #6 5.63 180,500 1615 14.88 96% 76% 46% 46%
2.9 Chapel #3 5.89 192,000 1040 20.88 99% 85% 84% 85%
3.0 Julia #6 6.03 429,688 965 14.32 80% 36% 67% 53%
3.1 Rust #2 6.28 138,736 1350 16.39 76% 44% 65% 76%
3.2 Rust #9 6.44 135,800 1850 17.00 47% 37% 92% 87%
3.4 Rust #4 6.74 137,440 1755 18.30 40% 95% 38% 99%
3.5 C++ g++ 6.96 757,156 1452 14.75 78% 91% 24% 17%
3.6 Java #6 7.27 426,032 1614 25.17 85% 85% 88% 88%
3.7 Java #3 7.34 426,540 1642 25.47 88% 88% 87% 84%
3.8 Go #7 7.63 163,072 1613 28.79 93% 93% 95% 97%
3.8 Ada 2012 GNAT #2 7.68 259,780 4911 16.65 87% 69% 20% 40%
4.1 Go #3 8.18 145,280 1729 29.88 96% 84% 84% 99%
4.1 Go #6 8.21 145,152 1596 30.01 94% 99% 85% 86%
4.4 Lisp SBCL #6 8.76 518,912 2485 31.45 86% 97% 87% 88%
4.4 Julia #7 8.87 479,756 1379 22.94 76% 72% 49% 61%
4.6 Go #4 9.16 140,032 1552 31.38 97% 86% 73% 86%
5.4 Lisp SBCL 10.77 570,368 2431 33.53 99% 71% 71% 70%
5.6 F# .NET #4 11.31 1,316,416 1522 30.18 50% 81% 47% 89%
6.0 C# .NET #4 12.06 612,408 1725 42.10 89% 87% 85% 89%
6.3 F# .NET #3 12.67 1,318,584 1124 28.91 85% 77% 44% 23%
7.8 Lisp SBCL #4 15.67 160,384 2292 15.67 0% 100% 0% 1%
7.9 Lisp SBCL #5 15.83 160,512 2323 15.83 0% 0% 0% 100%
8.2 Node.js #3 16.48 436,784 1817 44.54 79% 55% 77% 59%
9.2 Dart #3 18.50 221,428 1526 55.76 72% 56% 99% 73%
11 PHP #4 21.61 260,560 1290 69.80 64% 99% 69% 90%
11 Java #5 22.10 222,396 2225 48.14 95% 19% 71% 31%
11 Rust 22.54 157,124 1086 67.38 95% 55% 94% 53%
12 Haskell GHC 24.77 789,504 1067 87.14 85% 95% 86% 86%
14 F# .NET 27.63 910,836 713 89.96 79% 78% 79% 89%
17 Java #4 34.33 197,748 1887 34.67 0% 99% 0% 0%
19 Node.js #2 38.24 486,844 941 112.58 67% 74% 91% 61%
20 Node.js 39.98 356,716 1011 117.63 78% 76% 78% 60%
21 C# .NET #7 42.74 613,184 1449 43.35 38% 44% 1% 17%
22 Perl 43.90 1,247,396 659 154.01 92% 87% 86% 85%
22 Lisp SBCL #2 44.40 511,488 1291 44.39 0% 100% 0% 0%
22 Lisp SBCL #3 45.19 511,488 1297 45.18 0% 0% 100% 0%
23 Perl #4 45.38 1,070,336 483 151.76 98% 72% 71% 92%
25 Python 3 #3 50.15 262,368 1970 185.77 98% 90% 91% 91%
28 PHP #8 55.69 630,452 571 55.67 53% 46% 0% 0%
28 Perl #3 56.61 1,148,032 520 193.68 79% 95% 94% 74%
31 Racket #4 62.77 936,732 893 62.76 0% 100% 0% 0%
34 Python 3 #9 68.33 379,392 614 238.74 85% 91% 96% 76%
38 C# .NET #8 75.50 1,371,044 736 76.56 5% 6% 50% 40%
39 Java #8 78.46 2,083,000 786 80.86 24% 27% 27% 24%
39 Python 3 #4 79.01 506,112 663 236.67 61% 78% 73% 86%
43 Ruby yjit 86.11 171,696 583 5 min 97% 98% 77% 79%
48 Lua #2 97.17 596,604 620 97.16 94% 0% 6% 0%
66 Julia 132.60 1,558,404 703 132.21 55% 42% 1% 0%
69 Perl #2 139.32 659,584 365 137.50 0% 0% 0% 98%
90 Swift #8 181.50 627,328 658 180.87 54% 45% 0% 0%
96 Matz's Ruby 192.78 147,368 583 10 min 92% 72% 66% 93%
96 Racket 193.48 2,579,776 554 191.42 0% 97% 0% 1%
116 Swift #7 233.16 627,092 607 232.52 54% 44% 0% 1%
119 Python 3 238.45 499,072 499 237.78 99% 0% 0% 0%
119 Python 3 #8 238.78 623,448 525 237.93 46% 52% 0% 0%
126 Ruby yjit #2 252.78 181,808 426 252.58 99% 0% 0% 0%
138 Ruby yjit #3 277.67 207,596 546 277.88 22% 26% 22% 29%
149 Ruby yjit #7 5 min 392,960 792 298.86 32% 27% 27% 12%
212 VW Smalltalk #5 7 min 385,348 1323 7 min 0% 100% 0% 0%
246 Matz's Ruby #2 8 min 168,320 426 8 min 100% 0% 0% 0%
275 Dart 9 min 464,108 628 9 min 47% 50% 1% 0%
276 Dart #8 9 min 524,768 676 9 min 48% 51% 0% 0%
284 VW Smalltalk 9 min 385,972 1116 9 min 1% 99% 0% 0%
361 Matz's Ruby #3 12 min 168,832 546 12 min 100% 0% 0% 0%
392 Ruby yjit #8 13 min 572,736 529 13 min 0% 100% 0% 0%
Erlang Timed Out
Erlang #3 Timed Out
Intel Fortran Make Error
Node.js #8 Bad Output
Matz's Ruby #8 Failed
Matz's Ruby #7 Failed
Swift Make Error
 
 
  * possible hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu secs cpu load
7.2 * Swift #2 14.54 260,820 1373 55.20 94% 93% 97% 95%
8.1 * OCaml #3 16.29 258,556 1839 43.41 38% 90% 46% 92%
12 * Haskell GHC #2 23.53 839,040 1492 91.08 96% 96% 98% 96%
14 * OCaml #2 27.45 314,312 1247 61.90 21% 76% 95% 32%
19 * Haskell GHC #3 38.56 537,856 2266 138.53 91% 90% 90% 90%
23 * OCaml 45.59 338,436 894 45.59 0% 100% 0% 0%