/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 221.13224.63778,212359  97% 1% 0% 0%
1.2Ruby #2 7 min7 min167,228420  1% 100% 0% 0%
1.3Ruby JRuby #4 92.2383.491,825,996449  5% 55% 47% 5%
1.3Ruby #4 112.75112.79501,972449  1% 100% 0% 0%
1.3Perl #4 221.6971.041,066,204472  61% 96% 90% 67%
1.4Python 3 7 min7 min402,016487  0% 1% 100% 0%
1.4Perl #3 278.3584.541,143,524507  72% 75% 94% 90%
1.5Ruby #3 7 min7 min170,312540  26% 25% 23% 27%
1.5Ruby JRuby #3 9 min183.31907,264540  76% 91% 66% 85%
1.5Racket 190.80190.941,308,984542  29% 1% 66% 5%
1.8Ruby 8 min143.44131,008637  96% 80% 95% 72%
1.8Ruby JRuby 8 min167.76944,148637  91% 79% 82% 65%
1.8Python 3 #8 6 min124.40498,756647  59% 58% 87% 98%
1.8Perl 240.6070.321,886,164648  84% 90% 82% 87%
2.0F# Mono 295.43103.51662,576701  77% 73% 74% 59%
2.4OCaml 69.4569.51443,232870  96% 0% 0% 4%
2.5Racket #4 106.84106.83387,480881  0% 0% 1% 100%
2.6Erlang HiPE 6 min181.003,734,268930  84% 50% 53% 68%
2.6Erlang 7 min195.373,684,516930  82% 49% 58% 73%
2.6Erlang HiPE #3 6 min143.111,133,724932  68% 78% 64% 60%
2.6Erlang #3 7 min157.60996,280932  80% 73% 64% 57%
2.7Go 189.2863.63380,512980  86% 60% 92% 61%
2.8C# Mono #2 143.28143.31302,1121012  95% 1% 1% 5%
2.9PHP 43.0837.93247,8321036  4% 91% 4% 16%
3.0PHP #4 5 min94.40247,7241060  97% 76% 76% 82%
3.0Hack #4 137.0542.82221,9601061  66% 94% 74% 89%
3.1F# Mono #3 73.2331.12628,3841111  70% 69% 34% 65%
3.4OCaml #2 82.4737.09325,7401205  26% 80% 36% 82%
3.5C++ g++ #3 24.797.34154,7841252  81% 80% 81% 97%
3.5Go #5 76.0628.90261,9961268  37% 48% 83% 97%
3.6Lisp SBCL #2 145.75145.86331,2201277  0% 0% 1% 100%
3.6Lisp SBCL #3 141.54141.61331,2201284  0% 1% 1% 100%
3.8Scala #6 191.4252.66492,5801380  91% 91% 91% 91%
3.9C# Mono #3 96.5831.05334,6721404  97% 68% 70% 78%
4.0C# Mono 95.7095.74538,8121420  3% 1% 1% 97%
4.2F# Mono #4 74.5627.44663,1761505  99% 49% 66% 59%
4.3Go #2 144.3849.56256,9161531  62% 57% 88% 87%
4.5Java  #2 44.8512.81504,3121602  93% 86% 87% 84%
4.5Java  #3 46.4913.13504,9521630  86% 84% 86% 99%
4.7Haskell GHC 65.9917.73363,7801693  92% 93% 93% 97%
4.7C# Mono #4 89.0428.88563,9961696  71% 96% 70% 72%
4.8Clojure #6 132.7050.501,027,6321737  81% 54% 49% 81%
5.0OCaml #3 55.5020.29253,6241789  39% 57% 79% 100%
5.2Java  #4 61.2260.65186,3801873  70% 1% 1% 31%
5.4Clojure #4 213.0966.311,061,7001944  72% 89% 82% 78%
5.5Haskell GHC #2 74.8220.03365,1121965  96% 92% 95% 92%
5.7Rust 28.4128.44129,3322049  1% 1% 0% 100%
5.8Fortran Intel #2 65.5225.74196,2122079  48% 38% 90% 83%
5.8Scala #2 25.109.23171,4642080  55% 76% 69% 73%
6.2Java  #5 78.9336.26193,2162211  17% 88% 20% 95%
6.2Fortran Intel 88.6088.68187,1202238  0% 0% 100% 0%
6.3Lisp SBCL #4 37.0837.12138,4882272  0% 1% 1% 100%
6.4C gcc #7 35.0911.37188,4962280  64% 91% 61% 94%
6.4Lisp SBCL #5 37.0937.13138,4842301  0% 0% 1% 100%
6.6Pascal Free Pascal #2 86.0586.09130,5682383  91% 0% 0% 9%
6.8C gcc #6 54.4716.97192,2762439  96% 65% 62% 100%
6.8C# Mono #5 145.4951.21449,7442445  69% 78% 70% 69%
7.6Clojure #5 24.8610.20241,9602723  48% 98% 26% 73%
7.7Haskell GHC #3 122.1146.26313,5082749  54% 89% 43% 80%
8.4Clojure #7 112.5135.881,062,0363030  95% 74% 79% 67%
14Ada 2005 GNAT #2 31.9012.52256,1284865  85% 65% 52% 54%
C++ g++ Make Error2106
Erlang #2 Failed997
Erlang HiPE #2 Failed997
Hack Bad Output1038
Lisp SBCL Timed Out10 min847
Racket #2 Bad Output842
Ruby JRuby #2 Failed421
Scala Failed1625
Scala #4 Failed1287
"wrong" (different) algorithm / less comparable programs
1.7Python 3 #2 93.3351.67376,064624
4.0C# Mono #6 43.8115.191,013,2081433
5.7C gcc #8 9.479.49128,0442040
6.7C gcc #4 8.712.62175,7482409
7.0C gcc #5 53.5216.39292,2602519
9.5C++ g++ #6 10.032.96139,0843415
9.5C++ g++ #5 7.412.4652,7283416
15Java  12.643.64200,9245211
18Ada 2005 GNAT 14.127.04395,1126503
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