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 24.797.34154,7841252  81% 80% 81% 97%
1.1Go #3 30.938.42251,0241399  98% 91% 90% 90%
1.3Scala #2 25.109.23171,4642080  55% 76% 69% 73%
1.4Clojure #5 24.8610.20241,9602723  48% 98% 26% 73%
1.5Ada 2005 GNAT #2 29.9311.18276,6924865  61% 64% 59% 85%
1.5C gcc #7 35.0911.37188,4962280  64% 91% 61% 94%
1.7Java  #2 44.8512.81504,3121602  93% 86% 87% 84%
1.8Java  #3 46.4913.13504,9521630  86% 84% 86% 99%
1.9C gcc #9 38.2013.88134,6561535  95% 54% 99% 28%
2.3C gcc #6 54.4716.97192,2762439  96% 65% 62% 100%
2.4Haskell GHC 65.9917.73363,7801693  92% 93% 93% 97%
2.6PHP #2 53.6519.10248,0441141  65% 66% 70% 82%
2.7Haskell GHC #2 74.8220.03365,1121965  96% 92% 95% 92%
2.8OCaml #3 55.5020.29253,6241789  39% 57% 79% 100%
3.1F# Mono #4 59.0022.691,018,2641505  93% 57% 52% 60%
3.5Fortran Intel #2 65.5225.74196,2122079  48% 38% 90% 83%
3.7C# Mono #4 81.1526.88534,3041696  67% 96% 70% 70%
3.7F# Mono #3 60.9827.111,024,9121111  32% 89% 39% 67%
3.8Go #5 72.1027.57271,4201268  100% 83% 36% 45%
4.2C# Mono #3 96.4130.73344,5161404  84% 78% 81% 72%
4.5Lisp SBCL #5 32.9532.99152,3442301  0% 1% 0% 100%
4.5Lisp SBCL #4 32.9633.00152,3442272  100% 1% 1% 0%
4.9Clojure #7 112.5135.881,062,0363030  95% 74% 79% 67%
4.9Java  #5 78.9336.26193,2162211  17% 88% 20% 95%
5.1OCaml #2 82.4737.09325,7401205  26% 80% 36% 82%
5.8Hack #4 137.0542.82221,9601061  66% 94% 74% 89%
6.0PHP 49.0144.15247,8241036  5% 3% 100% 4%
6.3Haskell GHC #3 122.1146.26313,5082749  54% 89% 43% 80%
6.5Go #2 136.3247.62263,2161531  87% 56% 57% 89%
6.9Clojure #6 132.7050.501,027,6321737  81% 54% 49% 81%
7.1C# Mono #5 177.8952.14396,8762445  82% 90% 88% 84%
7.2Scala #6 191.4252.66492,5801380  91% 91% 91% 91%
7.6Go 177.5355.74388,864980  67% 99% 64% 90%
8.3Java  #4 61.2260.65186,3801873  70% 1% 1% 31%
9.0Clojure #4 213.0966.311,061,7001944  72% 89% 82% 78%
9.5OCaml 69.4569.51443,232870  96% 0% 0% 4%
9.6Perl 240.6070.321,886,164648  84% 90% 82% 87%
9.7Perl #4 221.6971.041,066,204472  61% 96% 90% 67%
11Pascal Free Pascal #2 80.2280.28132,1562383  1% 1% 0% 100%
11Ruby JRuby #4 92.2383.491,825,996449  5% 55% 47% 5%
12Perl #3 278.3584.541,143,524507  72% 75% 94% 90%
12C# Mono 86.3086.35534,5721420  63% 37% 2% 1%
12Fortran Intel 88.6088.68187,1202238  0% 0% 100% 0%
13PHP #4 5 min94.40247,7241060  97% 76% 76% 82%
13F# Mono 267.9698.62675,240701  76% 71% 67% 61%
15Racket #4 106.84106.83387,480881  0% 0% 1% 100%
15Ruby #4 112.75112.79501,972449  1% 100% 0% 0%
17Python 3 #8 6 min124.40498,756647  59% 58% 87% 98%
18Lisp SBCL #3 133.65133.73312,4801284  0% 1% 1% 100%
18Lisp SBCL #2 134.11135.40310,4161277  93% 1% 0% 8%
19C# Mono #2 139.02139.02309,2401012  1% 75% 24% 2%
19Erlang HiPE #3 6 min143.111,133,724932  68% 78% 64% 60%
20Ruby 8 min143.44131,008637  96% 80% 95% 72%
21Erlang #3 7 min157.60996,280932  80% 73% 64% 57%
23Ruby JRuby 8 min167.76944,148637  91% 79% 82% 65%
25Erlang HiPE 6 min181.003,734,268930  84% 50% 53% 68%
25Ruby JRuby #3 9 min183.31907,264540  76% 91% 66% 85%
26Racket 190.80190.941,308,984542  29% 1% 66% 5%
27Erlang 7 min195.373,684,516930  82% 49% 58% 73%
31Perl #2 221.13224.63778,212359  97% 1% 0% 0%
42Dart 5 min5 min590,768595  78% 2% 9% 14%
58Ruby #2 7 min7 min167,228420  1% 100% 0% 0%
62Python 3 7 min7 min402,016487  0% 1% 100% 0%
65Ruby #3 7 min7 min170,312540  26% 25% 23% 27%
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
0.3C++ g++ #5 7.412.4652,7283416
0.4C gcc #4 8.712.62175,7482409
0.4C++ g++ #6 10.032.96139,0843415
0.5Java  12.643.64200,9245211
0.7Ada 2005 GNAT 11.285.48409,7206503
1.3C gcc #8 9.479.49128,0442040
2.1C# Mono #6 42.6415.41111,1281433
2.2C gcc #5 53.5216.39292,2602519
2.9Java  #6 21.7921.18165,5242115
7.0Python 3 #2 93.3351.67376,064624
missing benchmark programs
Rust 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