k-nucleotide benchmark ≈240MB N=25,000,000

Each chart bar shows how many times more Memory, one ↓ k-nucleotide program used, compared to the program that used least Memory.

These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.

Column × shows how many times more each program used compared to the benchmark program that used least.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0JavaScript V8 #5 120.41120.5425,2481249  1% 1% 1% 100%
4.6Lisp SBCL #5 67.6167.69115,0402301  0% 0% 1% 100%
4.6Lisp SBCL #4 67.3667.43115,0442272  0% 0% 1% 100%
5.1C gcc #9 35.6335.65127,8521535  0% 1% 1% 100%
5.2Ruby 13 min13 min130,116637  1% 1% 0% 100%
5.2Pascal Free Pascal #2 46.1746.20130,2602383  1% 0% 0% 100%
5.5C++ g++ #3 24.1224.14139,4681252  0% 1% 1% 100%
5.9Rust 28.3428.36149,5202078  0% 1% 1% 100%
6.0Python 3 #3 295.95296.24152,2961937  1% 1% 1% 100%
6.1C gcc #7 39.7739.80154,1922280  1% 0% 0% 100%
6.1C gcc #6 53.3053.34154,2642439  0% 0% 0% 100%
6.2Fortran Intel #2 59.6659.69156,6082079  0% 1% 1% 100%
6.3Ruby #2 11 min11 min158,820420  0% 0% 1% 100%
6.4Ruby #3 13 min13 min162,496540  1% 1% 1% 100%
6.7Fortran Intel 109.43109.49168,4202238  0% 0% 1% 100%
7.8Java  #4 58.7258.78196,3721873  1% 1% 0% 100%
7.9Java  #5 66.3066.36199,6202211  1% 1% 0% 100%
9.8PHP #4 5 min5 min246,8161060  1% 1% 0% 100%
9.8PHP 45.6645.69246,9721036  0% 0% 1% 100%
10Haskell GHC 7 min7 min258,1601693  1% 0% 1% 100%
11Ada 2005 GNAT #2 21.0321.06271,6364865  0% 1% 0% 100%
11Go #5 53.7053.74274,5201268  0% 1% 1% 100%
11Go #2 133.32133.41277,1121531  0% 1% 1% 100%
13Dart 260.62260.78327,832595  1% 1% 1% 100%
13C# Mono #5 234.95235.10331,0442445  0% 1% 1% 100%
14JavaScript V8 275.34275.52342,948423  0% 1% 1% 100%
14Smalltalk VisualWorks #5 288.87289.20347,6241153  1% 1% 1% 100%
14Haskell GHC #3 77.9077.96348,9162749  0% 1% 0% 100%
14JavaScript V8 #3 6 min6 min361,284390  0% 1% 1% 100%
15Lisp SBCL #2 164.20164.29369,6081277  0% 1% 1% 100%
15Lisp SBCL #3 164.61164.69369,6081284  1% 1% 1% 100%
15Haskell GHC #2 68.9669.02372,5641965  0% 1% 1% 100%
15Python 3 #8 8 min8 min385,868647  1% 1% 0% 100%
16Clojure #5 39.9339.97395,6882852  1% 0% 1% 100%
17Go 154.05154.14417,692980  0% 1% 1% 100%
17JavaScript V8 #2 274.86275.03441,276451  0% 1% 1% 100%
18Perl #2 211.38214.42465,444359  0% 1% 1% 100%
20C# Mono #7 71.8471.88499,5121822  1% 1% 0% 100%
20Ruby #4 182.68182.73501,036449  0% 0% 1% 100%
20C# Mono #4 115.06115.10505,9241696  1% 0% 0% 100%
20C# Mono 118.87118.92507,6441420  0% 1% 1% 100%
21Java  #3 47.5447.58518,5881630  1% 1% 0% 100%
21Java  #2 46.3546.38519,0521602  0% 1% 0% 100%
21C# Mono #3 110.10110.16525,2641404  0% 1% 1% 100%
25F# Mono 12 min12 min641,736701  0% 1% 1% 100%
29Lua #2 242.00242.46724,636613  0% 1% 1% 100%
35Ruby JRuby 8 min8 min884,948637  1% 1% 1% 100%
36Ruby JRuby #3 8 min8 min908,756540  1% 1% 1% 100%
37Erlang HiPE #3 295.01298.15932,124932  0% 1% 1% 100%
39Clojure #4 145.41146.05996,7443081  1% 2% 1% 100%
40Clojure #6 82.2382.331,002,6522793  1% 0% 0% 100%
40Clojure #7 83.7683.831,004,0204387  0% 1% 1% 100%
45F# Mono #4 66.8466.881,144,4761505  0% 1% 1% 100%
45F# Mono #3 69.0869.131,146,3961111  1% 0% 1% 100%
47Java  #7 33.4433.481,190,0321844  1% 1% 0% 100%
56Racket 205.82206.071,422,360542  0% 1% 1% 100%
72Ruby JRuby #4 96.7096.801,824,852449  1% 1% 1% 100%
C CINT Timed Out1h 00 min1224
C# Mono #2 Failed1012
C++ g++ Make Error2106
Erlang HiPE Failed930
Erlang HiPE #2 Failed997
Go #3 Bad Output1399
Lisp SBCL Bad Output847
OCaml #3 Failed1789
OCaml Failed870
OCaml #2 Failed1205
Perl #4 Failed472
Perl Failed648
Perl #3 Failed507
Racket #2 Bad Output842
Racket #4 Bad Output881
Ruby JRuby #2 Failed421
Scala #4 Failed1287
Scala #6 Failed1380
Scala Failed1625
Scala #2 Failed2080
"wrong" (different) algorithm / less comparable programs
1.8C++ g++ #5 8.888.8944,6643416
1.8JavaScript V8 #4 108.94109.0546,7081177
4.1C# Mono #6 37.6638.41103,4921433
5.0C gcc #8 15.7015.71127,1642040
5.3C++ g++ #6 11.5311.54134,0643415
6.3Java  #6 21.7621.79158,7722115
6.5C gcc #4 13.2813.29163,6802409
7.0Java  9.979.98176,8405211
11C gcc #5 49.4749.50268,0362519
15Python 3 #2 131.92133.14374,328624
16Ada 2005 GNAT 10.2010.21411,1846503

 k-nucleotide benchmark : Hashtable update and k-nucleotide strings

You can write your own program for this task and contribute to the benchmarks game by following these general instructions.

More specifically:

diff program output for this 250KB input file (generated with the fasta program N = 25000) with this output file to check your program is correct before contributing.

We are trying to show the performance of various programming language implementations - so we ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.

We use FASTA files generated by the fasta benchmark as input for this benchmark. Note: the file may include both lowercase and uppercase codes.

Each program should

In practice, less brute-force would be used to calculate k-nucleotide frequencies, for example Virus Classification using k-nucleotide Frequencies and A Fast Algorithm for the Exhaustive Analysis of 12-Nucleotide-Long DNA Sequences. Applications to Human Genomics (105KB pdf).

Revised BSD license

  Home   Conclusions   License   Play