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

Each chart bar shows how many times slower, one ↓ k-nucleotide program was, compared to the fastest program.

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.

    sort sortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Ada 2005 GNAT #2 22.2722.30273,8764865  0% 1% 1% 100%
1.1C++ g++ #3 24.0324.04138,9601252  1% 1% 0% 100%
1.3Scala #2 29.8429.86222,4242080  0% 1% 1% 100%
1.6C gcc #9 35.2235.23126,7881535  0% 2% 1% 100%
1.7C gcc #7 38.0938.12153,4162280  1% 1% 0% 100%
2.0Clojure #5 43.9143.95373,0882723  0% 1% 0% 100%
2.0PHP 44.2744.30246,9601036  0% 1% 1% 100%
2.1Pascal Free Pascal #2 46.1746.20130,2602383  1% 0% 0% 100%
2.3C gcc #6 51.1351.16153,4202439  1% 1% 0% 100%
2.4Go #5 52.8352.87270,2961268  1% 1% 0% 100%
2.4Java  #3 53.4953.53908,6081630  1% 1% 0% 100%
2.4PHP #2 53.5253.55247,1801141  0% 1% 1% 100%
2.4Java  #2 53.8653.89914,8961602  1% 1% 0% 100%
2.5Java  #4 55.0755.11177,8081873  0% 0% 1% 100%
2.7F# Mono #4 60.6060.641,007,5521505  0% 1% 1% 100%
2.7Fortran Intel #2 60.7860.82166,8682079  1% 0% 0% 100%
2.8F# Mono #3 63.3363.37960,3121111  0% 0% 1% 100%
2.9Haskell GHC #2 64.2364.30324,4241965  0% 1% 0% 100%
2.9Lisp SBCL #4 65.3465.41108,8122272  1% 0% 1% 100%
2.9Lisp SBCL #5 65.6165.68108,8042301  1% 0% 0% 100%
3.2Java  #5 72.1572.21179,6002211  1% 1% 1% 100%
3.5Haskell GHC #3 78.4578.52340,1282749  0% 1% 1% 100%
3.8Clojure #6 84.3084.38987,1601737  0% 1% 0% 100%
4.2Ruby JRuby #4 94.3094.391,820,684449  0% 1% 1% 100%
4.3Clojure #7 96.1596.22988,9883030  1% 1% 1% 100%
4.4JavaScript V8 #5 98.4098.5041,7441249  0% 1% 1% 100%
4.5Scala #6 100.36100.49471,5881380  1% 1% 1% 100%
4.6C# Mono #3 103.28103.35319,1241404  1% 1% 0% 100%
4.7C# Mono #4 104.26104.31547,6121696  0% 1% 0% 100%
5.0C# Mono #5 111.22111.33324,5602445  1% 1% 0% 100%
5.1C# Mono 113.56113.61528,6401420  1% 1% 0% 100%
5.2Fortran Intel 114.85114.91179,3762238  0% 0% 0% 100%
7.2Go #2 157.82160.81269,1721531  1% 1% 1% 100%
7.3Lisp SBCL #3 161.61161.71363,1041284  1% 0% 0% 100%
7.3Lisp SBCL #2 162.05162.13363,1041277  1% 1% 0% 100%
7.4Go 164.30164.40393,224980  1% 1% 0% 100%
7.6Clojure #4 168.28168.41994,6281944  0% 1% 1% 100%
8.0C# Mono #2 179.28179.41292,4161012  0% 1% 1% 100%
8.6F# Mono 190.58190.81645,088701  0% 1% 1% 100%
8.6Ruby #4 189.00192.22499,732449  0% 1% 0% 100%
9.4Racket 208.22208.501,419,664542  0% 1% 1% 100%
9.4Perl #2 206.30209.52707,940359  0% 0% 0% 100%
10Lua #2 220.11220.81707,928613  0% 0% 0% 100%
12Erlang HiPE #3 267.32267.521,045,072932  0% 0% 0% 100%
14JavaScript V8 #2 5 min5 min455,588451  0% 1% 1% 100%
14Dart 5 min5 min416,868595  0% 1% 1% 100%
14JavaScript V8 5 min5 min339,960423  0% 1% 1% 100%
14PHP #4 5 min5 min246,8721060  1% 0% 0% 100%
14Smalltalk VisualWorks #5 5 min5 min343,3201153  0% 0% 0% 100%
18JavaScript V8 #3 6 min6 min358,236390  0% 1% 1% 100%
18Haskell GHC 6 min6 min258,2241693  0% 1% 1% 100%
22Python 3 #8 8 min8 min431,792647  0% 1% 1% 100%
23Ruby JRuby 8 min8 min891,912637  0% 1% 1% 100%
23Ruby JRuby #3 8 min8 min897,756540  1% 1% 1% 100%
25Python 3 9 min9 min383,028487  0% 1% 1% 100%
35Ruby #2 13 min13 min156,248420  0% 1% 1% 100%
39Ruby 14 min14 min128,276637  0% 1% 1% 100%
39Ruby #3 14 min14 min159,556540  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 #2 Failed421
Scala #4 Failed1287
Scala Failed1625
"wrong" (different) algorithm / less comparable programs
0.4C++ g++ #5 8.598.5943,1283416
0.5Java  10.5810.59152,8285211
0.5Ada 2005 GNAT 10.9610.97407,4326503
0.5C++ g++ #6 11.1911.20132,6123415
0.6C gcc #4 13.4313.45164,0882409
0.7C gcc #8 16.2216.23125,9962040
0.9Java  #6 19.7619.78156,1482115
1.7C# Mono #6 37.5138.2490,2241433
2.1C gcc #5 47.4547.48267,0362519
3.9JavaScript V8 #4 86.5486.6280,9681177
5.4Python 3 #2 121.03121.20369,756624
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