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

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

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.

    sortsortsort 
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Perl #2 206.30209.52707,940359  0% 0% 0% 100%
1.1JavaScript V8 #3 6 min6 min355,420390  0% 1% 1% 100%
1.2Ruby #2 12 min12 min160,544420  0% 1% 1% 100%
1.2JavaScript V8 5 min5 min337,744423  0% 1% 1% 100%
1.3Ruby JRuby #4 96.7096.801,824,852449  1% 1% 1% 100%
1.3Ruby #4 200.90225.71501,316449  0% 1% 1% 100%
1.3JavaScript V8 #2 5 min5 min452,716451  0% 1% 1% 100%
1.4Python 3 9 min9 min383,028487  0% 1% 1% 100%
1.5Ruby JRuby #3 8 min8 min908,756540  1% 1% 1% 100%
1.5Ruby #3 13 min13 min168,816540  0% 1% 1% 100%
1.5Racket 208.22208.501,419,664542  0% 1% 1% 100%
1.7Dart 287.88288.03360,428595  0% 1% 1% 100%
1.7Lua #2 220.11220.81707,928613  0% 0% 0% 100%
1.8Ruby JRuby 8 min8 min884,948637  1% 1% 1% 100%
1.8Ruby 13 min13 min129,992637  0% 1% 1% 100%
1.8Python 3 #8 8 min8 min431,792647  0% 1% 1% 100%
2.0F# Mono 193.80194.22645,440701  0% 1% 1% 100%
2.6Erlang HiPE #3 267.32267.521,045,072932  0% 0% 0% 100%
2.7Go 164.30164.40393,224980  1% 1% 0% 100%
2.8Ruby #5 51.9752.02357,432996  0% 1% 1% 100%
2.8C# Mono #2 174.98175.10292,4801012  0% 1% 1% 100%
2.9PHP 44.2744.30246,9601036  0% 1% 1% 100%
3.0PHP #4 5 min5 min246,8721060  1% 0% 0% 100%
3.1F# Mono #3 63.5863.621,007,1721111  1% 0% 1% 100%
3.2PHP #2 53.5253.55247,1801141  0% 1% 1% 100%
3.2Smalltalk VisualWorks #5 5 min5 min343,3201153  0% 0% 0% 100%
3.5JavaScript V8 #5 99.1199.2038,8561249  0% 1% 1% 100%
3.5C++ g++ #3 24.0324.04138,9601252  1% 1% 0% 100%
3.5Go #5 52.8352.87270,2961268  1% 1% 0% 100%
3.6Lisp SBCL #2 162.05162.13363,1041277  1% 1% 0% 100%
3.6Lisp SBCL #3 161.61161.71363,1041284  1% 0% 0% 100%
3.9C# Mono #3 103.48103.54319,1121404  1% 1% 1% 100%
4.0C# Mono 113.30113.34517,1401420  1% 0% 0% 100%
4.2F# Mono #4 61.6861.71980,4681505  0% 1% 1% 100%
4.3Go #2 157.82160.81269,1721531  1% 1% 1% 100%
4.3C gcc #9 35.2235.23126,7881535  0% 2% 1% 100%
4.5Java  #2 52.5752.60933,5121602  1% 1% 0% 100%
4.5Java  #3 52.5652.59936,8281630  1% 0% 0% 100%
4.7Haskell GHC 6 min6 min258,2241693  0% 1% 1% 100%
4.7C# Mono #4 104.69104.73515,7961696  1% 1% 1% 100%
4.8Clojure #6 87.5987.67999,3961737  0% 1% 1% 100%
5.1Java  #7 31.1831.211,189,8121844  1% 1% 0% 100%
5.2Java  #4 52.1652.20196,2761873  1% 0% 0% 100%
5.4Clojure #4 172.18172.31996,7641944  1% 1% 1% 100%
5.5Haskell GHC #2 64.2364.30324,4241965  0% 1% 0% 100%
5.8Fortran Intel #2 60.7860.82166,8682079  1% 0% 0% 100%
5.9Rust 27.7327.75148,2842113  1% 1% 0% 100%
6.2Java  #5 68.2468.29196,6162211  1% 1% 0% 100%
6.2Fortran Intel 114.85114.91179,3762238  0% 0% 0% 100%
6.3Lisp SBCL #4 65.3465.41108,8122272  1% 0% 1% 100%
6.4C gcc #7 38.0938.12153,4162280  1% 1% 0% 100%
6.4Lisp SBCL #5 65.6165.68108,8042301  1% 0% 0% 100%
6.6Pascal Free Pascal #2 46.1746.20130,2602383  1% 0% 0% 100%
6.8C gcc #6 51.1351.16153,4202439  1% 1% 0% 100%
6.8C# Mono #5 110.99111.09333,9162445  0% 1% 1% 100%
7.6Clojure #5 40.1940.22389,9322723  1% 1% 0% 100%
7.7Haskell GHC #3 78.4578.52340,1282749  0% 1% 1% 100%
8.4Clojure #7 81.1381.18995,6643030  0% 1% 1% 100%
14Ada 2005 GNAT #2 22.2722.30273,8764865  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 #6 Failed1380
Scala Failed1625
Scala #2 Failed2080
"wrong" (different) algorithm / less comparable programs
1.7Python 3 #2 121.03121.20369,756624
3.3JavaScript V8 #4 87.7587.8383,2401177
4.0C# Mono #6 37.5838.3589,1521433
5.7C gcc #8 16.2216.23125,9962040
5.9Java  #6 19.7619.78154,3882115
6.7C gcc #4 13.4313.45164,0882409
7.0C gcc #5 47.4547.48267,0362519
9.5C++ g++ #6 11.1911.20132,6123415
9.5C++ g++ #5 8.598.5943,1283416
15Java  9.899.90172,9525211
18Ada 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