/mobile Handheld Friendly website

 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.2Ruby #2 13 min13 min156,248420  0% 1% 1% 100%
1.3Ruby JRuby #4 94.3094.391,820,684449  0% 1% 1% 100%
1.3Ruby #4 189.00192.22499,732449  0% 1% 0% 100%
1.3JavaScript V8 #2 289.26289.42439,664451  0% 0% 1% 100%
1.4Python 3 9 min9 min383,028487  0% 1% 1% 100%
1.5Ruby #3 14 min14 min159,556540  0% 1% 1% 100%
1.5Ruby JRuby #3 8 min8 min897,756540  1% 1% 1% 100%
1.5Racket 208.22208.501,419,664542  0% 1% 1% 100%
1.7Lua #2 220.11220.81707,928613  0% 0% 0% 100%
1.8Ruby 14 min14 min128,276637  0% 1% 1% 100%
1.8Ruby JRuby 8 min8 min891,912637  0% 1% 1% 100%
1.8Python 3 #8 8 min8 min431,792647  0% 1% 1% 100%
2.0F# Mono 204.84205.11646,772701  0% 0% 1% 100%
2.6Erlang HiPE #3 267.32267.521,045,072932  0% 0% 0% 100%
2.7Go 172.42172.49379,316980  1% 0% 0% 100%
2.8C# Mono #2 179.70179.85289,7561012  0% 1% 1% 100%
2.9PHP 46.8246.87246,9481036  0% 0% 0% 100%
3.0PHP #4 5 min5 min246,8721060  1% 0% 0% 100%
3.1F# Mono #3 68.3668.411,005,4441111  0% 1% 1% 100%
3.2Smalltalk VisualWorks #5 5 min5 min343,3201153  0% 0% 0% 100%
3.5JavaScript V8 #5 96.3096.3938,0761249  0% 1% 1% 100%
3.5C++ g++ #3 23.8523.87137,1241252  1% 1% 0% 100%
3.5Go #5 56.5156.55260,1441268  0% 1% 0% 100%
3.6Lisp SBCL #2 180.70180.79355,4841277  0% 0% 1% 100%
3.6Lisp SBCL #3 177.52177.60355,4681284  0% 0% 1% 100%
3.8Scala #6 100.36100.49471,5881380  1% 1% 1% 100%
3.9C# Mono #3 107.63107.70316,2481404  0% 1% 1% 100%
4.0C# Mono 116.85116.91525,7281420  0% 1% 1% 100%
4.2F# Mono #4 65.8465.89990,4081505  0% 1% 1% 100%
4.3Go #2 170.61170.71256,4441531  1% 0% 1% 100%
4.5Java  #2 53.8653.89914,8961602  1% 1% 0% 100%
4.5Java  #3 53.4953.53908,6081630  1% 1% 0% 100%
4.7Haskell GHC 6 min6 min258,2241693  0% 1% 1% 100%
4.7C# Mono #4 107.60107.66545,0041696  1% 1% 1% 100%
4.8Clojure #6 84.3084.38987,1601737  0% 1% 0% 100%
5.2Java  #4 55.0755.11177,8081873  0% 0% 1% 100%
5.4Clojure #4 168.28168.41994,6281944  0% 1% 1% 100%
5.5Haskell GHC #2 64.2364.30324,4241965  0% 1% 0% 100%
5.7Rust 29.7830.36126,6962049  1% 0% 1% 100%
5.8Fortran Intel #2 60.7860.82166,8682079  1% 0% 0% 100%
5.8Scala #2 29.8429.86222,4242080  0% 1% 1% 100%
6.2Java  #5 72.1572.21179,6002211  1% 1% 1% 100%
6.2Fortran Intel 114.85114.91179,3762238  0% 0% 0% 100%
6.3Lisp SBCL #4 72.7572.81104,2082272  0% 1% 1% 100%
6.4C gcc #7 39.5339.56153,4362280  0% 1% 1% 100%
6.4Lisp SBCL #5 72.8672.92104,2242301  0% 1% 1% 100%
6.6Pascal Free Pascal #2 48.6448.66128,3962383  0% 0% 0% 100%
6.8C gcc #6 52.4052.43153,4442439  0% 1% 0% 100%
6.8C# Mono #5 118.57118.69361,9882445  0% 0% 1% 100%
7.6Clojure #5 43.9143.95373,0882723  0% 1% 0% 100%
7.7Haskell GHC #3 78.4578.52340,1282749  0% 1% 1% 100%
8.4Clojure #7 96.1596.22988,9883030  1% 1% 1% 100%
14Ada 2005 GNAT #2 23.0423.08253,4924865  0% 1% 0% 100%
C CINT Timed Out1h 00 min1224
C++ g++ Make Error2106
Erlang HiPE Failed930
Erlang HiPE #2 Failed997
JavaScript V8 #3 Timed Out1h 00 min390
JavaScript V8 Timed Out1h 00 min423
Lisp SBCL Timed Out10 min847
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
1.7Python 3 #2 121.03121.20369,756624
3.3JavaScript V8 #4 90.3490.4466,2641177
4.0C# Mono #6 39.2139.9984,5761433
5.7C gcc #8 16.8416.86126,0162040
6.7C gcc #4 13.4613.48162,2282409
7.0C gcc #5 48.7548.78267,1882519
9.5C++ g++ #6 11.3011.31132,6283415
9.5C++ g++ #5 8.698.7041,2643416
15Java  10.5810.59152,8285211
18Ada 2005 GNAT 11.9011.92398,9526503
missing benchmark programs
Dart 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