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 97.1697.2871,5081249  0% 1% 1% 100%
1.8C gcc #9 36.5436.57128,6401535  1% 1% 0% 100%
1.8Ruby 8 min8 min131,052637  1% 1% 0% 100%
1.9Pascal Free Pascal #2 79.9780.04132,5002383  1% 0% 0% 100%
2.1Lisp SBCL #5 32.9432.98152,3482301  0% 1% 0% 100%
2.1Lisp SBCL #4 32.9533.00152,3482272  0% 0% 1% 100%
2.1C++ g++ #3 18.1018.13152,5521252  0% 1% 1% 100%
2.3Scala #2 24.0524.07164,1202080  0% 1% 1% 100%
2.3Ruby #2 7 min7 min167,244420  1% 1% 0% 100%
2.4Ruby #3 8 min8 min170,396540  1% 1% 0% 100%
2.4Java  #4 60.7460.79174,1041873  1% 1% 0% 100%
2.5C gcc #7 32.1532.18180,3082280  0% 1% 1% 100%
2.5C gcc #6 51.9351.97180,3122439  0% 1% 1% 100%
2.6Fortran Intel 81.6681.71186,8642238  0% 0% 0% 100%
2.7Java  #5 69.2969.36194,9602211  0% 1% 0% 100%
2.7Fortran Intel #2 59.7559.79195,7562079  0% 0% 0% 100%
3.3Clojure #5 26.3726.39237,7562723  0% 1% 1% 100%
3.5PHP #4 5 min5 min247,7321060  0% 0% 0% 100%
3.5PHP 46.6946.71247,8201036  1% 0% 0% 100%
3.5PHP #2 52.2652.29248,0441141  1% 0% 1% 100%
3.5Go #3 30.7130.74252,4441399  1% 0% 1% 100%
3.5OCaml #3 56.2256.29253,6281789  0% 0% 0% 100%
3.7Hack #4 140.97141.77262,6601061  0% 1% 1% 100%
3.7Go #2 134.51138.18263,4761531  1% 1% 1% 100%
3.8Go #5 73.3973.46271,3401268  1% 1% 1% 100%
3.9Ada 2005 GNAT #2 32.1832.23276,1924865  1% 1% 1% 100%
4.3C# Mono #2 138.24138.39309,2321012  1% 1% 0% 100%
4.3Lisp SBCL #3 134.25134.34310,4161284  0% 1% 1% 100%
4.4Lisp SBCL #2 134.54134.62312,3681277  0% 1% 1% 100%
4.5Haskell GHC #3 92.0992.17322,9082749  0% 1% 1% 100%
4.7OCaml #2 80.7980.90337,8841205  0% 0% 0% 100%
4.8C# Mono #3 94.7394.82344,4601404  1% 1% 0% 100%
5.1Haskell GHC 47.7547.80362,4601693  0% 1% 1% 100%
5.2Haskell GHC #2 62.0862.15369,3321965  0% 0% 0% 100%
5.3Smalltalk VisualWorks #5 5 min5 min380,8521153  0% 0% 0% 100%
5.4Racket #4 96.6796.91387,480881  0% 1% 1% 100%
5.4Go 177.98178.13389,020980  1% 0% 1% 100%
5.6C# Mono #5 107.30107.45401,6362445  1% 1% 1% 100%
5.6Python 3 7 min7 min402,016487  1% 0% 0% 100%
5.9JavaScript V8 291.92294.05422,792423  0% 1% 1% 100%
6.2OCaml 69.3569.41443,224870  0% 0% 0% 100%
6.4Python 3 #8 6 min6 min456,532647  0% 1% 1% 100%
6.5JavaScript V8 #3 6 min6 min467,276390  1% 1% 1% 100%
6.9Scala #6 99.8599.99493,4601380  1% 0% 1% 100%
7.0Ruby #4 112.27112.31501,972449  0% 0% 0% 100%
7.1Java  #3 48.7948.83504,9841630  0% 1% 0% 100%
7.1Java  #2 48.5748.61505,8401602  0% 0% 1% 100%
7.2Dart 5 min5 min518,324595  0% 1% 1% 100%
7.4C# Mono #4 81.4181.46530,9961696  1% 0% 1% 100%
7.5C# Mono 86.3586.39536,6401420  1% 1% 0% 100%
7.8JavaScript V8 #2 290.88291.12558,680451  0% 1% 1% 100%
9.4F# Mono 165.36165.62675,440701  1% 1% 0% 100%
9.9Lua #2 192.80194.92707,636613  0% 0% 0% 100%
11Perl #2 212.24215.90778,052359  0% 0% 0% 100%
14F# Mono #4 59.4559.52987,7721505  1% 1% 0% 100%
14F# Mono #3 62.7262.781,022,6681111  1% 0% 1% 100%
15Clojure #4 5 min5 min1,054,4281944  0% 1% 1% 100%
15Clojure #6 105.62105.751,054,9121737  0% 1% 1% 100%
15Clojure #7 101.54101.631,058,4883030  0% 0% 1% 100%
15Ruby JRuby #3 7 min7 min1,086,272540  1% 1% 1% 100%
15Ruby JRuby 7 min7 min1,086,580637  0% 1% 1% 100%
16Erlang HiPE #3 292.66296.501,160,884932  0% 0% 0% 100%
18Racket 189.40189.781,308,968542  0% 1% 1% 100%
26Ruby JRuby #4 89.9090.251,862,368449  0% 1% 1% 100%
51Erlang HiPE 5 min5 min3,632,748930  8% 2% 1% 100%
C++ g++ Make Error2106
Erlang HiPE #2 Failed997
Hack Bad Output1038
Lisp SBCL Timed Out10 min847
Perl #3 Failed507
Perl Failed648
Perl #4 Failed472
Racket #2 Bad Output842
Ruby JRuby #2 Failed421
Scala Failed1625
Scala #4 Failed1287
"wrong" (different) algorithm / less comparable programs
0.7C++ g++ #5 7.317.3252,0883416
1.5C# Mono #6 31.8232.63110,4641433
1.8C gcc #8 8.828.83128,0402040
2.0C++ g++ #6 9.639.64144,0923415
2.1JavaScript V8 #4 101.05101.18146,7401177
2.3Java  #6 22.4122.44165,4882115
2.5C gcc #4 8.808.81176,6122409
2.9Java  8.338.34204,9965211
3.9C gcc #5 50.8450.88281,7402519
5.3Python 3 #2 91.6091.75375,452624
5.7Ada 2005 GNAT 12.1812.20409,7526503
missing benchmark programs
Rust No program

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

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