The Computer Language
24.09 Benchmarks Game

k-nucleotide

These are crowd sourced programs, contributed to the project by an ever-changing self-selected group.

We include both un-optimised programs and heavily optimised programs (look at the gz source code size). We include both single-thread programs and multi-thread programs (look at the cpu secs and cpu load). We include [pdf] vector parallelism and even hand-written vector instructions. How the programs are written matters!

Always look at the source code.

× source secs mem gz cpu secs cpu load
1.0 C++ g++ #2 2.02 156,512 1634 6.09 92% 67% 72% 71%
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.5 C# .NET 3.04 184,820 2046 10.53 87% 90% 71% 98%
1.7 Rust #8 3.53 137,372 1549 10.47 53% 99% 87% 58%
1.9 F# .NET #6 3.89 187,008 1913 12.37 74% 77% 79% 89%
2.0 Rust #5 3.96 137,844 1745 11.95 91% 71% 48% 91%
2.0 C gcc 3.98 130,432 1512 12.93 96% 56% 90% 83%
2.1 C++ g++ #3 4.18 165,384 1280 13.93 97% 79% 79% 79%
2.4 F# .NET #2 4.88 199,280 1932 17.00 80% 82% 91% 95%
2.4 F# .NET #5 4.91 199,168 1964 16.86 94% 95% 75% 78%
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.5 C# .NET #6 5.06 187,908 1615 12.77 42% 40% 95% 76%
2.9 Chapel #3 5.89 192,000 1040 20.88 99% 85% 84% 85%
3.0 Julia #8 6.08 428,144 965 13.85 68% 61% 36% 64%
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.3 Rust #4 6.74 137,440 1755 18.30 40% 95% 38% 99%
3.5 C++ g++ 7.10 757,084 1452 14.78 10% 87% 17% 93%
3.6 Java #6 7.27 426,032 1614 25.17 85% 85% 88% 88%
3.6 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.9 Ada 2012 GNAT #2 7.79 259,704 4911 17.02 27% 84% 20% 87%
4.0 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.3 Lisp SBCL #6 8.76 518,912 2485 31.45 86% 97% 87% 88%
4.4 Julia #7 8.84 472,984 1379 23.04 76% 62% 48% 74%
4.5 Go #4 9.16 140,032 1552 31.38 97% 86% 73% 86%
5.1 F# .NET #4 10.34 1,321,532 1522 26.40 43% 67% 89% 55%
5.3 Lisp SBCL 10.77 570,368 2431 33.53 99% 71% 71% 70%
5.8 C# .NET #4 11.67 778,008 1725 41.58 87% 89% 93% 88%
5.9 F# .NET #3 11.96 1,323,896 1124 25.77 20% 92% 29% 75%
7.8 Lisp SBCL #4 15.67 160,384 2292 15.67 0% 100% 0% 1%
7.8 Lisp SBCL #5 15.83 160,512 2323 15.83 0% 0% 0% 100%
8.1 Node.js #3 16.35 429,444 1817 44.67 54% 88% 70% 61%
9.2 Dart #3 18.57 221,676 1526 55.64 70% 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%
13 F# .NET 26.43 1,068,296 713 86.77 78% 86% 88% 76%
14 OCaml #2 27.45 314,312 1247 61.90 21% 76% 95% 32%
17 Java #4 34.33 197,748 1887 34.67 0% 99% 0% 0%
18 Node.js #2 36.18 485,300 941 111.06 77% 66% 98% 65%
19 Node.js 37.58 351,188 1011 114.02 64% 95% 68% 75%
20 C# .NET #7 40.69 762,328 1449 41.14 1% 15% 0% 84%
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%
22 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 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%
39 Python 3 #8 79.48 505,984 663 237.21 74% 61% 76% 87%
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.71 1,559,044 703 132.61 97% 0% 0% 2%
69 Perl #2 139.32 659,584 365 137.50 0% 0% 0% 98%
95 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%
118 Python 3 238.45 499,072 499 237.78 99% 0% 0% 0%
125 Ruby yjit #2 252.78 181,808 426 252.58 99% 0% 0% 0%
137 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%
211 VW Smalltalk #5 7 min 385,348 1323 7 min 0% 100% 0% 0%
245 Matz's Ruby #2 8 min 168,320 426 8 min 100% 0% 0% 0%
273 Dart 9 min 464,456 628 9 min 100% 0% 0% 0%
283 VW Smalltalk 9 min 385,972 1116 9 min 1% 99% 0% 0%
359 Matz's Ruby #3 12 min 168,832 546 12 min 100% 0% 0% 0%
Erlang Timed Out
Erlang #3 Timed Out
Intel Fortran Make Error
Matz's Ruby #7 Failed
Swift Make Error
 
 
  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%
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%