The Computer Language
22.05 Benchmarks Game

k-nucleotide

First a few simple programs.

Then optimisations, multicore parallelism, [pdf] vector parallelism.

Last hand-written vector instructions and "unsafe" programs.

  source secs mem gz    
  Lua #2 112.22 596,492 613    
  Julia 198.21 1,962,152 695    
  Matz's Ruby #2 7 min 168,112 420    
 
 
 
× source secs mem gz cpu cpu load
1.0 C++ g++ #2 1.96 156,416 1631 5.92 68% 97% 69% 69%
1.5 Rust #7 2.86 131,236 1578 9.12 99% 66% 87% 66%
1.5 Rust #6 2.86 159,088 1691 10.68 99% 92% 92% 92%
1.6 C# .NET 3.21 185,200 2044 10.97 90% 87% 70% 95%
1.7 Rust #8 3.38 137,632 1543 10.39 98% 93% 53% 63%
2.0 C gcc 3.87 130,156 1506 12.31 88% 90% 55% 85%
2.0 F# .NET #6 3.95 183,708 1907 12.55 67% 78% 78% 95%
2.1 Rust #5 4.09 133,912 1739 12.23 94% 46% 66% 94%
2.2 C++ g++ #3 4.22 165,588 1276 14.14 97% 79% 79% 80%
2.4 F# .NET #2 4.74 198,604 1926 16.92 82% 97% 96% 84%
2.5 Java  4.92 349,544 1812 16.17 85% 84% 82% 79%
2.6 Julia #8 5.04 366,728 951 11.31 58% 77% 52% 39%
2.9 Chapel #4 5.68 184,520 1031 20.19 99% 85% 86% 86%
3.1 C# .NET #6 6.00 180,876 1603 15.87 74% 99% 47% 46%
3.2 Rust #2 6.23 137,896 1347 16.27 100% 74% 44% 44%
3.4 Ada 2012 GNAT #2 6.67 258,980 4908 13.87 90% 34% 18% 65%
3.5 Chapel #3 6.82 179,556 1007 24.26 99% 88% 88% 85%
3.5 C++ g++ 6.83 756,320 1446 14.54 11% 94% 92% 18%
3.5 Rust #9 6.90 134,732 1841 18.77 31% 95% 97% 50%
3.5 Rust #4 6.93 136,216 1749 19.31 95% 54% 34% 97%
3.7 Java #6 7.31 343,684 1607 25.67 84% 90% 85% 93%
3.7 Julia #7 7.35 370,872 1368 18.12 78% 62% 43% 64%
3.8 Java #3 7.39 344,652 1635 25.73 84% 86% 94% 85%
3.8 Go #7 7.41 159,432 1607 28.49 95% 98% 95% 97%
4.1 Go #6 7.96 149,712 1590 29.40 86% 98% 98% 88%
4.4 Go #3 8.60 149,984 1722 30.25 93% 80% 81% 98%
4.5 Go #4 8.94 144,528 1543 30.22 98% 73% 83% 84%
5.4 Lisp SBCL #6 10.55 521,168 2479 38.59 97% 90% 90% 90%
6.8 Lisp SBCL 13.42 572,680 2424 44.54 99% 77% 78% 78%
7.8 Dart #3 15.34 237,896 1520 45.73 74% 74% 75% 76%
8.0 Node js #3 15.65 419,748 1812 43.70 45% 90% 62% 82%
8.4 Lisp SBCL #5 16.50 162,116 2320 16.50 0% 100% 0% 0%
8.6 Lisp SBCL #4 16.86 162,432 2291 16.86 1% 1% 100% 0%
9.4 Java #5 18.54 210,368 2219 43.27 26% 26% 90% 92%
10 PHP #4 20.54 257,260 1079 69.91 96% 94% 79% 73%
12 Haskell GHC 24.28 541,916 1059 81.88 84% 92% 80% 81%
13 Rust 25.95 152,220 1078 70.04 47% 100% 81% 43%
19 Node js #2 36.81 72,156 935 112.88 65% 66% 80% 96%
19 Java #4 37.07 199,824 1882 37.48 33% 1% 9% 60%
20 Node js 38.87 621,752 1008 115.69 91% 64% 61% 81%
21 Perl 41.92 1,253,716 652 146.30 94% 87% 85% 86%
23 Perl #4 44.79 1,069,344 476 150.18 77% 71% 92% 97%
23 Python 3 #3 46.09 252,668 1967 172.53 93% 93% 93% 97%
28 Lisp SBCL #3 54.80 513,868 1290 54.80 0% 0% 0% 100%
28 Perl #3 55.12 1,147,148 513 184.94 94% 77% 92% 74%
28 Lisp SBCL #2 55.65 513,940 1284 55.65 100% 0% 0% 0%
32 Racket #4 63.58 988,500 885 63.58 0% 0% 0% 100%
35 Erlang #3 68.33 899,692 937 203.56 70% 64% 84% 80%
36 Python 3 70.51 351,092 607 240.16 93% 98% 82% 68%
40 Erlang 78.51 5,771,892 936 209.96 89% 54% 72% 56%
41 Python 3 #8 80.16 473,988 655 242.16 83% 61% 98% 62%
41 Ruby 80.32 408,036 576 281.84 78% 83% 91% 99%
57 Lua #2 112.22 596,492 613 112.22 3% 3% 100% 2%
68 Perl #2 133.90 659,704 359 131.83 99% 0% 0% 0%
89 Matz's Ruby 174.82 126,732 576 9 min 69% 83% 86% 90%
101 Julia 198.21 1,962,152 695 196.54 0% 99% 0% 0%
102 Racket 201.19 2,614,596 547 199.02 0% 0% 99% 0%
124 Ruby #2 243.81 455,288 420 243.58 0% 100% 0% 0%
139 Ruby #7 273.53 657,660 785 271.49 25% 25% 27% 25%
144 Ruby #3 282.08 461,428 540 282.00 27% 27% 23% 24%
224 VW Smalltalk #5 7 min 385,252 1317 7 min 100% 0% 0% 0%
232 Matz's Ruby #2 7 min 168,112 420 7 min 0% 0% 0% 100%
283 Dart 9 min 346,172 623 9 min 100% 0% 0% 0%
298 VW Smalltalk 9 min 385,732 1110 9 min 0% 100% 0% 0%
303 Matz's Ruby #7 9 min 452,440 870 33 min 71% 90% 89% 84%
351 Matz's Ruby #3 11 min 168,588 540 11 min 100% 0% 0% 0%
Classic Fortran Make Error
OCaml #2 Make Error
OCaml Make Error
Swift Make Error
 
 
  hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu cpu load
5.5 Haskell GHC #3 10.81 537,888 2261 37.64 84% 95% 85% 85%
7.0 Swift #2 13.68 257,052 1367 52.46 98% 96% 96% 95%
8.5 OCaml #3 16.74 255,644 1833 44.08 41% 95% 38% 91%
11 Haskell GHC #2 21.46 694,340 1486 83.25 97% 96% 96% 99%