fasta benchmark ≈240MB N=25,000,000

Each chart bar shows how many times slower, one ↓ fasta 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.0Rust #2 4.611.5521,7081887  82% 72% 73% 73%
1.3C gcc #6 5.361.972,4721914  61% 34% 78% 99%
1.4Java  #5 5.602.1939,3682457  58% 72% 66% 61%
1.5Go #3 6.202.333,9561344  65% 57% 76% 69%
1.6Fortran Intel #4 2.442.445121327  2% 0% 1% 100%
2.0Go #2 6.573.0611,7361388  69% 60% 48% 42%
2.1C gcc #5 3.303.308241261  1% 0% 1% 100%
2.2Haskell GHC #6 7.613.3213,5481567  54% 54% 52% 70%
2.3Haskell GHC #7 4.763.5113,8321550  37% 32% 27% 43%
2.4Haskell GHC #5 5.133.7713,8521378  35% 42% 35% 27%
2.6Haskell GHC #2 4.524.036,796979  4% 5% 100% 4%
2.6Ada 2005 GNAT #5 4.064.071,9882186  1% 0% 0% 100%
2.7C# Mono #4 10.504.1987,8921505  57% 78% 60% 57%
2.7C++ g++ #3 4.224.231,4601286  2% 1% 0% 100%
2.8Fortran Intel #3 4.334.335081190  0% 1% 100% 0%
2.9C++ g++ #2 4.434.441,4161105  1% 0% 0% 100%
3.0C++ g++ 4.674.671,4801033  1% 1% 100% 0%
3.3Java  #4 5.165.0531,0681507  2% 2% 1% 100%
3.3Rust 5.065.066,2721211  1% 1% 100% 0%
3.9Fortran Intel 6.036.035081155  0% 0% 100% 3%
3.9C gcc #4 6.036.048081221  5% 96% 0% 1%
3.9OCaml #6 6.046.05200,8721161  1% 1% 100% 0%
4.0C++ g++ #4 6.126.127481266  100% 1% 1% 0%
4.1C# Mono #2 6.366.3740,0441180  0% 0% 100% 1%
4.3Clojure #6 7.846.6476,2921692  89% 8% 16% 7%
4.6C gcc 7.037.038201185  0% 100% 1% 0%
4.6Go 7.187.181,7721036  1% 1% 0% 100%
4.8Scala #3 7.477.3536,5601053  78% 23% 1% 2%
4.9Lisp SBCL #6 7.597.606,8841751  0% 100% 1% 1%
5.1Java  #2 7.947.8332,0481240  2% 1% 79% 21%
5.2Ada 2005 GNAT 8.048.051,9521346  100% 1% 0% 0%
5.5F# Mono 8.448.4542,248978  0% 1% 1% 100%
5.7OCaml #3 8.798.792,9961042  0% 0% 1% 100%
5.8Dart 9.028.9529,1361386  1% 99% 2% 0%
6.2Clojure #5 11.159.6275,8041964  40% 8% 7% 62%
6.3Lisp SBCL #3 9.749.756,6321579  1% 100% 1% 0%
7.0Scala 10.9510.8042,4321080  86% 15% 1% 2%
7.2Pascal Free Pascal #4 11.1311.1481112  0% 1% 100% 1%
11Racket #3 17.2417.2431,7721276  0% 1% 1% 100%
11Lisp SBCL #2 17.6117.626,6201617  1% 0% 0% 100%
12Lisp SBCL 17.7717.786,6201419  1% 100% 0% 0%
17Hack #4 26.0826.10117,7641109  100% 0% 0% 1%
21Erlang HiPE #2 34.5932.9921,6841164  84% 14% 2% 6%
28Hack #3 43.2743.29117,5281029  1% 0% 1% 99%
34Hack #2 52.9653.21115,4201003  1% 80% 15% 7%
35Racket 53.3853.4023,0081054  44% 1% 1% 57%
36Erlang #2 56.8354.8729,9281164  92% 9% 2% 1%
54Ruby JRuby #3 90.1883.71715,252973  23% 39% 25% 22%
62Python 3 #3 96.3096.335,628977  1% 100% 0% 0%
63Ruby #3 97.4297.4659,576973  100% 0% 0% 0%
68Perl 105.80105.8352,320838  1% 1% 0% 100%
75PHP #3 116.02116.053,3681030  0% 1% 100% 0%
75Erlang HiPE 157.88116.3319,8561039  45% 47% 34% 11%
77Erlang 161.65119.1617,2441039  64% 9% 50% 17%
81Python 3 #5 121.99124.903,391,5761933  61% 60% 39% 44%
102Ruby #5 156.52158.177,216987  18% 25% 23% 36%
104Ruby #4 158.82160.17234,576904  32% 45% 10% 16%
121Ruby #2 186.78186.85206,164732  42% 1% 59% 1%
127Python 3 194.57195.845,588792  22% 31% 31% 19%
134Ruby JRuby 214.27207.73664,912760  27% 35% 20% 22%
183Perl #4 281.66282.083,196934  16% 30% 44% 12%
245Perl #2 6 min6 min3,188886  5% 47% 14% 36%
247PHP #2 6 min6 min3,3721006  25% 29% 31% 17%
Haskell GHC Bad Output1421
Haskell GHC #4 Bad Output1413
"wrong" (different) algorithm / less comparable programs
1.4Perl #5 2.102.1025,1001113
1.6C gcc #2 2.422.431,3681169
1.9C++ g++ #5 2.902.911,3961543
9.2Haskell GHC #3 15.7514.246,5521408

 fasta benchmark : Generate and write random DNA sequences

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 N = 1000 with this 10KB 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.

Each program should

We'll use the generated FASTA file as input for other benchmarks (reverse-complement, k-nucleotide).

Random DNA sequences can be based on a variety of Random Models (554KB pdf). You can use Markov chains or independently distributed nucleotides to generate random DNA sequences online.

Revised BSD license

  Home   Conclusions   License   Play