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.0JavaScript V8 #5 95.9296.0242,1841249  0% 3% 1% 100%
2.7Lisp SBCL #5 67.6167.69115,0402301  0% 0% 1% 100%
2.7Lisp SBCL #4 67.3667.43115,0442272  0% 0% 1% 100%
3.0C gcc #9 35.6335.65127,8521535  0% 1% 1% 100%
3.1Ruby 13 min13 min130,116637  1% 1% 0% 100%
3.1Pascal Free Pascal #2 46.1746.20130,2602383  1% 0% 0% 100%
3.3C++ g++ #3 24.1224.14139,4681252  0% 1% 1% 100%
3.5Rust 28.2528.27149,6962078  0% 0% 1% 100%
3.6Python 3 #3 295.95296.24152,2961937  1% 1% 1% 100%
3.7C gcc #7 39.7739.80154,1922280  1% 0% 0% 100%
3.7C gcc #6 53.3053.34154,2642439  0% 0% 0% 100%
3.7Fortran Intel #2 59.6659.69156,6082079  0% 1% 1% 100%
3.8Ruby #2 11 min11 min158,820420  0% 0% 1% 100%
3.9Ruby #3 13 min13 min162,496540  1% 1% 1% 100%
4.0Fortran Intel 109.43109.49168,4202238  0% 0% 1% 100%
4.7Java  #4 58.7258.78196,3721873  1% 1% 0% 100%
4.7Java  #5 66.3066.36199,6202211  1% 1% 0% 100%
5.9PHP #4 5 min5 min246,8161060  1% 1% 0% 100%
5.9PHP 45.6645.69246,9721036  0% 0% 1% 100%
6.1Haskell GHC 7 min7 min258,1601693  1% 0% 1% 100%
6.4Ada 2005 GNAT #2 21.0321.06271,6364865  0% 1% 0% 100%
6.5Go #5 53.7053.74274,5201268  0% 1% 1% 100%
6.6Go #2 133.32133.41277,1121531  0% 1% 1% 100%
7.7Dart 261.50261.67323,592595  0% 1% 1% 100%
7.8C# Mono #5 234.95235.10331,0442445  0% 1% 1% 100%
8.2Smalltalk VisualWorks #5 288.87289.20347,6241153  1% 1% 1% 100%
8.3Haskell GHC #3 77.9077.96348,9162749  0% 1% 0% 100%
8.4JavaScript V8 264.70264.84354,228423  0% 1% 1% 100%
8.4JavaScript V8 #3 6 min6 min355,976390  0% 1% 1% 100%
8.8Lisp SBCL #2 164.20164.29369,6081277  0% 1% 1% 100%
8.8Lisp SBCL #3 164.61164.69369,6081284  1% 1% 1% 100%
8.8Haskell GHC #2 68.9669.02372,5641965  0% 1% 1% 100%
9.1Python 3 #8 8 min8 min385,868647  1% 1% 0% 100%
9.2Clojure #5 40.1940.22389,9322723  1% 1% 0% 100%
10Go 154.05154.14417,692980  0% 1% 1% 100%
11JavaScript V8 #2 261.61261.75451,644451  0% 1% 1% 100%
11Perl #2 211.38214.42465,444359  0% 1% 1% 100%
12C# Mono #7 71.8471.88499,5121822  1% 1% 0% 100%
12Ruby #4 182.68182.73501,036449  0% 0% 1% 100%
12C# Mono #4 115.06115.10505,9241696  1% 0% 0% 100%
12C# Mono 118.87118.92507,6441420  0% 1% 1% 100%
12Java  #3 47.5447.58518,5881630  1% 1% 0% 100%
12Java  #2 46.3546.38519,0521602  0% 1% 0% 100%
12C# Mono #3 110.10110.16525,2641404  0% 1% 1% 100%
15F# Mono 12 min12 min641,736701  0% 1% 1% 100%
17Lua #2 242.00242.46724,636613  0% 1% 1% 100%
21Ruby JRuby 8 min8 min884,948637  1% 1% 1% 100%
22Ruby JRuby #3 8 min8 min908,756540  1% 1% 1% 100%
22Erlang HiPE #3 268.37271.50932,380932  0% 1% 1% 100%
24Clojure #7 81.1381.18995,6643030  0% 1% 1% 100%
24Clojure #4 172.18172.31996,7641944  1% 1% 1% 100%
24Clojure #6 87.5987.67999,3961737  0% 1% 1% 100%
27F# Mono #4 66.8466.881,144,4761505  0% 1% 1% 100%
27F# Mono #3 69.0869.131,146,3961111  1% 0% 1% 100%
28Java  #7 33.4433.481,190,0321844  1% 1% 0% 100%
34Racket 205.82206.071,422,360542  0% 1% 1% 100%
43Ruby JRuby #4 96.7096.801,824,852449  1% 1% 1% 100%
C CINT Timed Out1h 00 min1224
C# Mono #2 Failed1012
C++ g++ Make Error2106
Erlang HiPE Failed930
Erlang HiPE #2 Failed997
Go #3 Bad Output1399
Lisp SBCL Bad Output847
OCaml #3 Failed1789
OCaml Failed870
OCaml #2 Failed1205
Perl #4 Failed472
Perl Failed648
Perl #3 Failed507
Racket #2 Bad Output842
Racket #4 Bad Output881
Ruby JRuby #2 Failed421
Scala #4 Failed1287
Scala #6 Failed1380
Scala Failed1625
Scala #2 Failed2080
"wrong" (different) algorithm / less comparable programs
1.1C++ g++ #5 8.888.8944,6643416
1.9JavaScript V8 #4 92.7892.8882,1241177
2.5C# Mono #6 37.6638.41103,4921433
3.0C gcc #8 15.7015.71127,1642040
3.2C++ g++ #6 11.5311.54134,0643415
3.8Java  #6 21.7621.79158,7722115
3.9C gcc #4 13.2813.29163,6802409
4.2Java  9.979.98176,8405211
6.4C gcc #5 49.4749.50268,0362519
8.9Python 3 #2 131.92133.14374,328624
9.7Ada 2005 GNAT 10.2010.21411,1846503

 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