/mobile Handheld Friendly website

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

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

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.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Lisp SBCL #4 71.9271.99104,2082272  0% 1% 0% 100%
1.0Lisp SBCL #5 71.9372.01104,2242301  0% 1% 1% 100%
1.2Rust 30.3730.39126,6962049  1% 0% 100% 0%
1.2Ruby 14 min257.66128,344637  68% 94% 100% 67%
1.2Pascal Free Pascal #2 46.8846.91128,3962383  89% 0% 0% 11%
1.3C++ g++ #3 23.317.26137,2161252  74% 97% 76% 75%
1.5C gcc #7 43.3015.85153,6722280  96% 96% 37% 46%
1.5C gcc #6 56.2018.61153,6762439  95% 54% 54% 100%
1.5Ruby #2 13 min13 min156,256420  0% 99% 1% 0%
1.5Fortran Intel #2 70.6828.99158,1242079  35% 42% 99% 68%
1.5Ruby #3 14 min14 min161,372540  19% 31% 32% 20%
1.6Fortran Intel 122.78122.86166,9522238  92% 0% 8% 0%
1.7Java  #4 55.3854.37176,9761873  97% 6% 6% 2%
1.7Java  #5 81.2336.06178,6442211  86% 32% 85% 24%
2.0Scala #2 30.2511.00209,6602080  74% 87% 54% 60%
2.4PHP #4 5 min87.70246,8841060  78% 94% 84% 88%
2.4PHP 45.7940.06246,9521036  4% 90% 14% 7%
2.4Ada 2005 GNAT #2 21.9610.11253,4924865  24% 36% 100% 60%
2.5Go #2 170.0654.60256,4401531  100% 65% 62% 90%
2.5Go #5 52.7219.59260,0801268  96% 51% 82% 42%
2.5Haskell GHC #2 70.5319.10260,1881965  91% 91% 91% 98%
2.5Haskell GHC 7 min111.20264,4361693  97% 96% 96% 97%
2.8C# Mono #2 177.41177.45289,7641012  94% 1% 2% 5%
3.0C# Mono #3 164.0057.33316,3441404  85% 95% 57% 50%
3.4Lisp SBCL #3 171.44171.54355,4681284  0% 100% 0% 1%
3.4Lisp SBCL #2 171.83172.18355,4841277  99% 1% 1% 1%
3.5C# Mono #5 127.8241.28361,9962445  83% 73% 73% 79%
3.5Python 3 #8 8 min161.33364,488647  89% 60% 98% 56%
3.6Go 170.0958.59379,444980  81% 62% 57% 93%
3.8Python 3 9 min9 min391,748487  1% 100% 0% 0%
4.4Clojure #5 52.4619.47460,0322723  90% 77% 66% 38%
4.5Scala #6 156.4041.51473,5241380  95% 94% 94% 95%
4.8Haskell GHC #3 113.8037.68496,0202749  59% 83% 61% 100%
4.8Ruby #4 201.00201.08499,252449  0% 0% 0% 100%
5.0C# Mono 116.56116.60525,7361420  0% 99% 0% 1%
5.2C# Mono #4 107.3434.65543,9201696  100% 71% 72% 68%
6.0F# Mono 5 min111.81626,276701  72% 77% 75% 74%
6.8Perl #2 223.14226.16708,152359  65% 0% 0% 34%
8.3Erlang HiPE #3 6 min137.89864,700932  99% 48% 49% 72%
8.7Java  #2 49.7014.28909,1081602  85% 96% 81% 86%
8.9Java  #3 45.3313.06923,0681630  81% 83% 85% 99%
9.5Clojure #4 188.0263.10994,2241944  75% 72% 67% 85%
9.6Clojure #6 110.4536.731,001,5161737  77% 67% 87% 71%
9.6Clojure #7 128.8839.301,002,6763030  91% 81% 71% 85%
9.6F# Mono #4 64.4826.081,004,9361505  57% 92% 47% 53%
9.6F# Mono #3 65.7528.151,005,4401111  39% 86% 50% 59%
10Perl #4 234.9278.201,049,332472  81% 95% 65% 61%
10Ruby JRuby 10 min201.011,060,796637  67% 85% 86% 66%
11Perl #3 280.1690.611,126,916507  95% 80% 70% 65%
11Ruby JRuby #3 8 min176.561,194,036540  78% 68% 71% 87%
14Racket 219.87220.011,419,712542  96% 0% 1% 4%
17Perl 242.0769.891,774,668648  82% 88% 85% 92%
19Ruby JRuby #4 97.4489.931,952,044449  58% 5% 14% 33%
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.273.0241,4483416
1.0C# Mono #6 47.9317.32106,7881433
1.2C gcc #8 16.7716.78126,0162040
1.3C++ g++ #6 11.943.56131,6883415
1.6C gcc #4 13.513.83162,2282409
1.8Java  14.164.00183,2165211
2.6C gcc #5 50.3415.23267,4842519
3.4Python 3 #2 126.3773.25351,796624
3.8Ada 2005 GNAT 11.345.04398,5606503
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