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 99.1199.2038,8561249  0% 1% 1% 100%
2.8Lisp SBCL #5 65.6165.68108,8042301  1% 0% 0% 100%
2.8Lisp SBCL #4 65.3465.41108,8122272  1% 0% 1% 100%
3.3C gcc #9 35.2235.23126,7881535  0% 2% 1% 100%
3.3Ruby 14 min14 min128,276637  0% 1% 1% 100%
3.4Pascal Free Pascal #2 46.1746.20130,2602383  1% 0% 0% 100%
3.6C++ g++ #3 24.0324.04138,9601252  1% 1% 0% 100%
3.8Rust 27.7327.75148,2842113  1% 1% 0% 100%
3.9C gcc #7 38.0938.12153,4162280  1% 1% 0% 100%
3.9C gcc #6 51.1351.16153,4202439  1% 1% 0% 100%
4.0Ruby #2 13 min13 min156,248420  0% 1% 1% 100%
4.1Ruby #3 14 min14 min159,556540  0% 1% 1% 100%
4.3Fortran Intel #2 60.7860.82166,8682079  1% 0% 0% 100%
4.6Java  #4 55.0755.11177,8081873  0% 0% 1% 100%
4.6Fortran Intel 114.85114.91179,3762238  0% 0% 0% 100%
4.6Java  #5 72.1572.21179,6002211  1% 1% 1% 100%
5.7Scala #2 29.8429.86222,4242080  0% 1% 1% 100%
6.4PHP #4 5 min5 min246,8721060  1% 0% 0% 100%
6.4PHP 44.2744.30246,9601036  0% 1% 1% 100%
6.4PHP #2 53.5253.55247,1801141  0% 1% 1% 100%
6.6Haskell GHC 6 min6 min258,2241693  0% 1% 1% 100%
6.9Go #2 157.82160.81269,1721531  1% 1% 1% 100%
7.0Go #5 52.8352.87270,2961268  1% 1% 0% 100%
7.0Ada 2005 GNAT #2 22.2722.30273,8764865  0% 1% 1% 100%
7.5C# Mono #2 174.98175.10292,4801012  0% 1% 1% 100%
8.2C# Mono #3 103.48103.54319,1121404  1% 1% 1% 100%
8.3Haskell GHC #2 64.2364.30324,4241965  0% 1% 0% 100%
8.6C# Mono #5 110.99111.09333,9162445  0% 1% 1% 100%
8.7JavaScript V8 5 min5 min337,744423  0% 1% 1% 100%
8.8Haskell GHC #3 78.4578.52340,1282749  0% 1% 1% 100%
8.8Smalltalk VisualWorks #5 5 min5 min343,3201153  0% 0% 0% 100%
9.1JavaScript V8 #3 6 min6 min355,420390  0% 1% 1% 100%
9.2Ruby #5 52.6052.66357,160996  1% 0% 0% 100%
9.3Dart 287.88288.03360,428595  0% 1% 1% 100%
9.3Lisp SBCL #3 161.61161.71363,1041284  1% 0% 0% 100%
9.3Lisp SBCL #2 162.05162.13363,1041277  1% 1% 0% 100%
9.6Clojure #5 43.9143.95373,0882723  0% 1% 0% 100%
9.9Python 3 9 min9 min383,028487  0% 1% 1% 100%
10Go 164.30164.40393,224980  1% 1% 0% 100%
11Python 3 #8 8 min8 min431,792647  0% 1% 1% 100%
12JavaScript V8 #2 5 min5 min452,716451  0% 1% 1% 100%
12Scala #6 100.36100.49471,5881380  1% 1% 1% 100%
13Ruby #4 189.00192.22499,732449  0% 1% 0% 100%
13C# Mono #4 104.69104.73515,7961696  1% 1% 1% 100%
13C# Mono 113.30113.34517,1401420  1% 0% 0% 100%
17F# Mono 193.80194.22645,440701  0% 1% 1% 100%
18Lua #2 220.11220.81707,928613  0% 0% 0% 100%
18Perl #2 206.30209.52707,940359  0% 0% 0% 100%
23Ruby JRuby 8 min8 min891,912637  0% 1% 1% 100%
23Ruby JRuby #3 8 min8 min897,756540  1% 1% 1% 100%
23Java  #3 53.4953.53908,6081630  1% 1% 0% 100%
24Java  #2 53.8653.89914,8961602  1% 1% 0% 100%
25F# Mono #4 61.6861.71980,4681505  0% 1% 1% 100%
25Clojure #6 84.3084.38987,1601737  0% 1% 0% 100%
25Clojure #7 96.1596.22988,9883030  1% 1% 1% 100%
26Clojure #4 168.28168.41994,6281944  0% 1% 1% 100%
26F# Mono #3 63.5863.621,007,1721111  1% 0% 1% 100%
27Erlang HiPE #3 267.32267.521,045,072932  0% 0% 0% 100%
37Racket 208.22208.501,419,664542  0% 1% 1% 100%
47Ruby JRuby #4 94.3094.391,820,684449  0% 1% 1% 100%
C CINT Timed Out1h 00 min1224
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 #5 Failed996
Ruby JRuby #2 Failed421
Scala #4 Failed1287
Scala Failed1625
"wrong" (different) algorithm / less comparable programs
1.1C++ g++ #5 8.598.5943,1283416
2.1JavaScript V8 #4 87.7587.8383,2401177
2.3C# Mono #6 37.5838.3589,1521433
3.2C gcc #8 16.2216.23125,9962040
3.4C++ g++ #6 11.1911.20132,6123415
3.9Java  10.5810.59152,8285211
4.0Java  #6 19.7619.78156,1482115
4.2C gcc #4 13.4313.45164,0882409
6.9C gcc #5 47.4547.48267,0362519
9.5Python 3 #2 121.03121.20369,756624
10Ada 2005 GNAT 10.9610.97407,4326503

 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