/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 25.897.79155,9161252  78% 80% 78% 98%
1.1Scala #2 23.868.31215,3042080  56% 79% 75% 77%
1.7Ada 2005 GNAT #2 36.2213.19256,1444865  49% 42% 100% 84%
1.7Java 7  #3 46.3913.25450,9721630  86% 84% 96% 85%
1.7Java 7  #2 46.4713.27447,0161602  85% 94% 89% 82%
2.1C gcc #7 44.6416.00180,3802280  35% 50% 98% 97%
2.4C gcc #6 59.5918.40180,3802439  97% 55% 75% 97%
2.4Haskell GHC 68.5018.58374,4881693  91% 93% 93% 93%
2.6Haskell GHC #2 74.7920.02374,9161965  93% 94% 92% 96%
2.8OCaml #3 56.8221.99258,4801789  55% 39% 100% 65%
3.3ATS #3 92.3225.57177,8323810  88% 96% 89% 88%
3.3Fortran Intel #2 65.5225.74196,2122079  48% 38% 90% 83%
3.6C# Mono #4 85.2628.21561,2921696  93% 69% 71% 70%
4.3Go #5 83.2633.62262,2241268  97% 86% 36% 30%
4.5Clojure #7 111.6234.801,006,6403030  84% 74% 84% 80%
4.7OCaml #2 85.1536.74437,9281205  32% 31% 81% 88%
4.8Lisp SBCL #5 37.0837.13138,3122301  0% 0% 0% 100%
4.8Lisp SBCL #4 37.2637.30138,3042272  0% 0% 0% 100%
5.3ATS #2 41.5441.57125,9123238  0% 0% 0% 100%
5.4Haskell GHC #3 120.2142.02496,8442749  62% 100% 50% 75%
6.0Scala #6 166.1146.37489,4201380  91% 89% 89% 91%
6.5Clojure #6 136.1250.87999,8641737  78% 78% 63% 49%
7.2C# Mono #5 188.3256.25539,2482445  85% 81% 81% 90%
8.5Clojure #4 214.9265.97995,9921944  89% 83% 67% 87%
9.0OCaml 70.2270.30411,188870  0% 0% 100% 0%
9.0Perl 240.6070.321,886,164648  84% 90% 82% 87%
9.7Go 213.0975.34380,312980  85% 100% 35% 63%
11Pascal Free Pascal #2 86.0586.09130,5682383  91% 0% 0% 9%
11C# Mono 86.9086.31537,9161420  1% 2% 97% 1%
11Fortran Intel 88.6088.68187,1202238  0% 0% 100% 0%
12Racket #4 89.6089.61378,488881  0% 0% 100% 0%
12PHP #4 5 min92.65247,6401060  88% 81% 93% 96%
14C# Mono #3 6 min111.08506,4441404  87% 93% 94% 85%
16F# Mono 6 min124.91975,260701  78% 77% 77% 69%
17Python 3 #8 6 min129.56451,488647  60% 98% 58% 81%
18Erlang HiPE #3 6 min143.111,133,724932  68% 78% 64% 60%
18Lisp SBCL #3 143.15143.25489,8721284  0% 3% 97% 0%
19Lisp SBCL #2 147.82148.16489,8721277  0% 15% 85% 0%
20Erlang #3 7 min157.60996,280932  80% 73% 64% 57%
23Ruby JRuby 9 min176.19939,416637  94% 69% 74% 83%
23Ruby JRuby #3 9 min176.42934,968540  67% 91% 78% 75%
23C# Mono #2 177.06176.66550,3281012  1% 4% 67% 29%
23Erlang HiPE 6 min181.003,734,268930  84% 50% 53% 68%
25Erlang 7 min195.373,684,516930  82% 49% 58% 73%
25Racket 195.96195.981,304,560542  0% 0% 27% 73%
26Ruby 2.0 11 min201.03128,768637  88% 84% 70% 98%
29Perl #2 221.13224.63778,212359  97% 1% 0% 0%
57Python 3 7 min7 min402,568487  86% 6% 8% 0%
72Ruby 2.0 #2 9 min9 min289,620420  0% 0% 0% 100%
77Ruby 2.0 #3 11 min10 min291,564540  22% 33% 33% 21%
C++ g++ Make Error2106
Erlang #2 Failed997
Erlang HiPE #2 Failed997
Lisp SBCL Bad Output847
Racket #2 Bad Output842
Ruby JRuby #2 Failed421
Scala Failed1625
Scala #4 Failed1287
"wrong" (different) algorithm / less comparable programs
0.3C++ g++ #5 7.762.4749,2643416
0.3C gcc #4 9.042.69174,4642409
0.4C++ g++ #6 11.803.33139,2403415
0.4Java 7  11.763.36167,1205211
0.9Ada 2005 GNAT 14.477.05399,7446503
2.0C# Mono #6 44.1315.63271,2401433
2.5C gcc #5 56.6619.51282,0362519
7.0Python 3 #2 97.0054.37497,084624
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