/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 24.417.33155,9241252  79% 80% 81% 95%
1.3Scala #2 25.109.23171,4642080  55% 76% 69% 73%
1.7Ada 2005 GNAT #2 31.9012.52256,1284865  85% 65% 52% 54%
1.7Java  #2 44.8512.81504,3121602  93% 86% 87% 84%
1.8Clojure #5 35.9513.12506,0802723  58% 79% 56% 82%
1.8Java  #3 46.4913.13504,9521630  86% 84% 86% 99%
2.2C gcc #7 43.9916.22180,3722280  38% 97% 97% 41%
2.4Haskell GHC 65.9917.73363,7801693  92% 93% 93% 97%
2.7C gcc #6 59.6819.71180,3722439  97% 98% 54% 55%
2.7Haskell GHC #2 74.8220.03365,1121965  96% 92% 95% 92%
2.8OCaml #3 55.5020.29253,6241789  39% 57% 79% 100%
3.5Fortran Intel #2 65.5225.74196,2122079  48% 38% 90% 83%
3.7F# Mono #4 74.5627.44663,1761505  99% 49% 66% 59%
3.9Rust 28.4128.44129,3322049  1% 1% 0% 100%
3.9C# Mono #4 89.0428.88563,9961696  71% 96% 70% 72%
3.9Go #5 76.0628.90261,9961268  37% 48% 83% 97%
4.2C# Mono #3 96.5831.05334,6721404  97% 68% 70% 78%
4.2F# Mono #3 73.2331.12628,3841111  70% 69% 34% 65%
4.9Java  #5 78.9336.26193,2162211  17% 88% 20% 95%
5.1OCaml #2 82.4737.09325,7401205  26% 80% 36% 82%
5.1Lisp SBCL #4 37.0837.12138,4882272  0% 1% 1% 100%
5.1Lisp SBCL #5 37.0937.13138,4842301  0% 0% 1% 100%
5.2PHP 43.0837.93247,8321036  4% 91% 4% 16%
5.3Clojure #7 128.7739.071,024,4803030  84% 80% 86% 81%
5.8Hack #4 137.0542.82221,9601061  66% 94% 74% 89%
6.3Haskell GHC #3 122.1146.26313,5082749  54% 89% 43% 80%
6.8Go #2 144.3849.56256,9161531  62% 57% 88% 87%
7.0C# Mono #5 145.4951.21449,7442445  69% 78% 70% 69%
7.2Scala #6 191.4252.66492,5801380  91% 91% 91% 91%
7.4Clojure #6 146.8754.371,075,3001737  46% 77% 83% 67%
8.3Java  #4 61.2260.65186,3801873  70% 1% 1% 31%
8.7Go 189.2863.63380,512980  86% 60% 92% 61%
9.4Clojure #4 221.8068.67993,0481944  86% 73% 78% 86%
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%
11Ruby JRuby #4 92.2383.491,825,996449  5% 55% 47% 5%
12Perl #3 278.3584.541,143,524507  72% 75% 94% 90%
12Pascal Free Pascal #2 86.0586.09130,5682383  91% 0% 0% 9%
12Fortran Intel 88.6088.68187,1202238  0% 0% 100% 0%
13PHP #4 5 min94.40247,7241060  97% 76% 76% 82%
13C# Mono 95.7095.74538,8121420  3% 1% 1% 97%
14F# Mono 295.43103.51662,576701  77% 73% 74% 59%
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%
19Lisp SBCL #3 141.54141.61331,2201284  0% 1% 1% 100%
20Erlang HiPE #3 6 min143.111,133,724932  68% 78% 64% 60%
20C# Mono #2 143.28143.31302,1121012  95% 1% 1% 5%
20Ruby 8 min143.44131,008637  96% 80% 95% 72%
20Lisp SBCL #2 145.75145.86331,2201277  0% 0% 1% 100%
22Erlang #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%
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.432.4549,4003416
0.4C gcc #4 8.852.65174,4682409
0.4C++ g++ #6 10.803.08139,0203415
0.5Java  12.643.64200,9245211
1.0Ada 2005 GNAT 14.127.04395,1126503
1.2C gcc #8 8.868.87128,1082040
2.1C# Mono #6 43.8115.191,013,2081433
2.5C gcc #5 57.1618.05282,0202519
7.1Python 3 #2 93.3351.67376,064624
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