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 #5 65.7065.77108,8042301  1% 0% 100% 1%
1.0Lisp SBCL #4 65.4165.47109,2082272  0% 1% 1% 100%
1.2Ruby 14 min257.66128,344637  68% 94% 100% 67%
1.2Pascal Free Pascal #2 46.2246.24130,0682383  0% 100% 1% 1%
1.2C gcc #9 35.8912.38130,7561535  94% 63% 91% 43%
1.3C++ g++ #3 23.447.22139,1361252  76% 76% 78% 97%
1.4Rust 27.089.04148,3162113  62% 82% 60% 98%
1.4Ruby #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.5C gcc #6 53.4416.99163,7882439  64% 97% 61% 97%
1.5C gcc #7 40.7214.77165,8002280  90% 46% 96% 45%
1.5Fortran Intel 122.78122.86166,9522238  92% 0% 8% 0%
1.6Java  #4 55.3854.37176,9761873  97% 6% 6% 2%
1.6Java  #5 81.2336.06178,6442211  86% 32% 85% 24%
1.9Scala #2 30.2511.00209,6602080  74% 87% 54% 60%
2.3PHP #4 5 min87.70246,8841060  78% 94% 84% 88%
2.3PHP 48.5943.11246,9681036  4% 4% 90% 16%
2.3PHP #2 55.4120.16247,1841141  62% 65% 58% 91%
2.4Haskell GHC #2 70.5319.10260,1881965  91% 91% 91% 98%
2.4Haskell GHC 7 min111.20264,4361693  97% 96% 96% 97%
2.5Go #2 153.6648.21267,0961531  100% 90% 66% 64%
2.5Go #5 50.7619.05270,1441268  46% 45% 84% 93%
2.5Ada 2005 GNAT #2 21.189.72273,9404865  57% 81% 27% 55%
2.7C# Mono #2 175.09175.13292,4761012  40% 1% 44% 17%
2.9C# Mono #3 101.2634.92319,1761404  97% 65% 61% 68%
3.1C# Mono #5 183.2252.74333,7202445  91% 84% 87% 88%
3.2Dart 287.74285.80345,924595  1% 3% 3% 96%
3.3Ruby #5 52.9517.66357,344996  69% 68% 72% 95%
3.3Lisp SBCL #2 162.33162.44363,1041277  1% 100% 0% 1%
3.3Lisp SBCL #3 161.76161.83364,2401284  1% 0% 100% 1%
3.3Python 3 #8 8 min161.33364,488647  89% 60% 98% 56%
3.4Clojure #5 42.6516.70369,9642723  75% 73% 55% 54%
3.6Python 3 9 min9 min391,748487  1% 100% 0% 0%
3.6Go 161.1054.14392,272980  91% 68% 80% 62%
4.4Scala #6 156.4041.51473,5241380  95% 94% 94% 95%
4.6Haskell GHC #3 113.8037.68496,0202749  59% 83% 61% 100%
4.6Ruby #4 201.00201.08499,252449  0% 0% 0% 100%
4.7C# Mono #4 104.3634.12515,5281696  98% 68% 71% 70%
4.8C# Mono 113.26113.30517,2041420  8% 0% 1% 93%
5.9F# Mono 5 min110.39644,644701  76% 73% 72% 74%
6.5Perl #2 223.14226.16708,152359  65% 0% 0% 34%
7.9Erlang HiPE #3 6 min137.89864,700932  99% 48% 49% 72%
8.4Java  #2 49.7014.28909,1081602  85% 96% 81% 86%
8.5Java  #3 45.3313.06923,0681630  81% 83% 85% 99%
9.0Clojure #4 187.8564.51984,0121944  94% 66% 63% 70%
9.0Clojure #6 106.3836.21984,5281737  83% 83% 70% 58%
9.1Clojure #7 114.4636.68985,7923030  84% 78% 60% 91%
9.2F# Mono #3 62.4327.21999,4921111  51% 45% 56% 79%
9.3F# Mono #4 59.1224.631,007,2601505  50% 55% 46% 90%
9.6Perl #4 234.9278.201,049,332472  81% 95% 65% 61%
9.7Ruby JRuby 10 min201.011,060,796637  67% 85% 86% 66%
10Perl #3 280.1690.611,126,916507  95% 80% 70% 65%
11Ruby JRuby #3 8 min176.561,194,036540  78% 68% 71% 87%
11Java  #7 35.1710.411,200,4801844  82% 90% 89% 78%
13Racket 219.87220.011,419,712542  96% 0% 1% 4%
16Perl 242.0769.891,774,668648  82% 88% 85% 92%
18Ruby JRuby #4 97.4489.931,952,044449  58% 5% 14% 33%
C++ g++ Make Error2106
Erlang HiPE Failed930
Erlang HiPE #2 Failed997
Go #3 Bad Output1399
Lisp SBCL Timed Out10 min847
OCaml #3 Failed1789
OCaml Failed870
OCaml #2 Failed1205
Racket #2 Bad Output842
Racket #4 Bad Output881
Ruby JRuby #5 Failed996
Ruby JRuby #2 Failed421
Scala #4 Failed1287
Scala Failed1625
"wrong" (different) algorithm / less comparable programs
0.4C++ g++ #5 9.072.9645,0123416
0.8C# Mono #6 44.0616.4782,2321433
1.2C gcc #8 16.1616.18125,9962040
1.2C++ g++ #6 11.623.49132,9843415
1.4C gcc #4 13.333.76155,0002409
1.4Java  #6 19.2219.10155,7682115
1.7Java  14.164.00183,2165211
2.5C gcc #5 48.2714.80277,2202519
3.2Python 3 #2 126.3773.25351,796624
3.7Ada 2005 GNAT 10.564.66407,8886503

 k-nucleotide benchmark : Hashtable update and k-nucleotide strings

You can write your own program for this task and contribute to the benchmarks game by following these general instructions.

More specifically:

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