/mobile Handheld Friendly website

 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.0C++ g++ #3 23.397.40138,1001252  73% 74% 74% 97%
1.3Ada 2005 GNAT #2 22.369.60253,4804865  29% 66% 39% 100%
1.4Scala #2 27.5110.18217,3082080  70% 74% 51% 76%
1.7Java 7  #2 44.8312.93494,2641602  84% 81% 85% 99%
1.8Java 7  #3 46.7713.37494,7721630  96% 82% 87% 87%
2.0C gcc #7 39.8814.64153,6882280  96% 92% 50% 36%
2.2ATS #3 54.9916.09159,4843810  83% 81% 82% 98%
2.3C gcc #6 54.7017.40153,6682439  91% 51% 77% 96%
2.5Go #5 48.8118.28260,2561268  97% 34% 66% 72%
2.9Haskell GHC #2 79.2621.34374,3641965  91% 91% 95% 95%
3.9Fortran Intel #2 70.6828.99158,1242079  35% 42% 99% 68%
4.2C# Mono #3 99.6931.43317,8121404  70% 96% 83% 69%
4.4C# Mono #4 105.8532.27545,8521696  78% 100% 78% 74%
4.4ATS #2 32.3232.33124,1323238  0% 1% 100% 0%
4.9Haskell GHC #3 103.9736.40359,7282749  49% 46% 96% 95%
5.3Clojure #6 118.4339.221,015,7801737  82% 66% 74% 82%
5.4C# Mono #5 123.3039.92363,6162445  74% 74% 74% 88%
6.0Scala #6 160.6844.49485,5721380  90% 91% 91% 91%
6.3Pascal Free Pascal #2 46.8846.91128,3962383  89% 0% 0% 11%
7.4Clojure #7 181.7254.791,014,0763030  86% 78% 86% 84%
8.3Go 171.4461.26379,332980  45% 70% 66% 100%
9.4Lisp SBCL #4 69.1469.22105,2442272  0% 0% 0% 100%
9.4Lisp SBCL #5 69.4669.54105,2482301  1% 92% 9% 1%
9.4Clojure #4 211.8169.851,006,4521944  77% 75% 77% 87%
9.4Perl 242.0769.891,774,668648  82% 88% 85% 92%
11PHP #4 292.6382.96246,8081060  90% 98% 83% 83%
12Haskell GHC 5 min87.82263,7521693  98% 98% 99% 98%
13F# Mono 265.0294.57647,280701  61% 58% 80% 80%
15C# Mono 113.58113.64526,6121420  0% 0% 0% 100%
17Fortran Intel 122.78122.86166,9522238  92% 0% 8% 0%
19Erlang HiPE #3 6 min137.89864,700932  99% 48% 49% 72%
22C# Mono #2 159.72159.77290,4401012  3% 97% 1% 0%
22Python 3 #8 8 min161.22422,160647  62% 55% 97% 90%
23Lisp SBCL #2 173.66173.80355,1001277  0% 88% 12% 0%
24Lisp SBCL #3 174.52174.63355,1001284  0% 0% 0% 100%
25Ruby JRuby #3 9 min182.01920,168540  88% 80% 86% 92%
25Ruby JRuby 10 min186.63920,900637  72% 90% 92% 74%
30Racket 218.65219.021,419,368542  93% 1% 6% 0%
31Perl #2 223.14226.16708,152359  65% 0% 0% 34%
33Ruby 2.0 13 min247.46128,020637  94% 74% 96% 76%
75Python 3 9 min9 min353,020487  0% 0% 100% 0%
105Ruby 2.0 #2 12 min12 min158,088420  27% 54% 17% 3%
135Ruby 2.0 #3 19 min16 min216,296540  48% 10% 14% 43%
C++ g++ Make Error2106
Erlang HiPE Failed930
Erlang HiPE #2 Failed997
Lisp SBCL Bad Output847
OCaml #3 Failed1789
OCaml Failed870
OCaml #2 Failed1205
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 9.813.1441,3403416
0.5C++ g++ #6 11.923.57131,1843415
0.5C gcc #4 12.623.60161,9562409
0.5Java 7  14.234.01151,7885211
0.7Ada 2005 GNAT 11.325.15398,8046503
2.0C# Mono #6 42.1115.0582,4641433
2.1C gcc #5 51.4515.36267,4402519
9.7Python 3 #2 125.6472.05459,992624
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