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.591.5321,7761887  82% 73% 74% 73%
1.2Go #3 6.171.802,8561344  85% 85% 86% 89%
1.3C gcc #6 5.361.972,4721914  61% 34% 78% 99%
1.4Java  #5 5.602.1939,3682457  58% 72% 66% 61%
1.6Fortran Intel #4 2.442.445121327  2% 0% 1% 100%
2.0Go #2 6.653.0611,1721388  44% 74% 54% 46%
2.2C 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.5Haskell GHC #5 5.133.7713,8521378  35% 42% 35% 27%
2.6Haskell GHC #2 4.524.036,796979  4% 5% 100% 4%
2.7Ada 2005 GNAT #5 4.064.071,9882186  1% 0% 0% 100%
2.8C++ 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# Mono #4 10.314.58129,5641505  57% 53% 63% 53%
3.0C++ g++ 4.674.671,4801033  1% 1% 100% 0%
3.3Java  #4 5.165.0531,0681507  2% 2% 1% 100%
3.4Rust 5.155.156,2881211  2% 100% 0% 1%
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.2C# Mono #2 6.366.3740,6241180  1% 0% 1% 100%
4.3Clojure #6 7.846.6476,2921692  89% 8% 16% 7%
4.6C gcc 7.037.038201185  0% 100% 1% 0%
4.8Go 7.317.311,0241036  0% 1% 0% 100%
4.8Scala #3 7.477.3536,5601053  78% 23% 1% 2%
5.0Lisp SBCL #6 7.597.606,8841751  0% 100% 1% 1%
5.1Java  #2 7.947.8332,0481240  2% 1% 79% 21%
5.3Ada 2005 GNAT 8.048.051,9521346  100% 1% 0% 0%
5.5F# Mono 8.388.3942,428978  1% 100% 0% 1%
5.7OCaml #3 8.798.792,9961042  0% 0% 1% 100%
5.8Dart 8.988.8831,8881386  2% 99% 1% 1%
6.3Clojure #5 11.159.6275,8041964  40% 8% 7% 62%
6.4Lisp SBCL #3 9.749.756,6321579  1% 100% 1% 0%
7.0Scala 10.9510.8042,4321080  86% 15% 1% 2%
7.3Pascal Free Pascal #4 11.1311.1481112  0% 1% 100% 1%
11Racket #3 17.0417.0434,3201276  1% 0% 100% 0%
11Lisp SBCL #2 17.6117.626,6201617  1% 0% 0% 100%
12Lisp SBCL 17.7717.786,6201419  1% 100% 0% 0%
16Hack #4 25.0725.08119,6321109  1% 1% 99% 1%
22Erlang HiPE #2 34.5932.9921,6841164  84% 14% 2% 6%
28Hack #3 43.1443.15119,6641029  1% 99% 0% 1%
33Racket 51.1151.1126,2401054  0% 1% 100% 1%
34Hack #2 52.1452.16117,8041003  100% 1% 1% 1%
36Erlang #2 56.8354.8729,9281164  92% 9% 2% 1%
63Python 3 #3 96.3096.335,628977  1% 100% 0% 0%
69Perl 105.80105.8352,320838  1% 1% 0% 100%
76PHP #3 116.02116.053,3681030  0% 1% 100% 0%
76Erlang HiPE 157.88116.3319,8561039  45% 47% 34% 11%
78Erlang 161.65119.1617,2441039  64% 9% 50% 17%
81Python 3 #5 121.99124.903,391,5761933  61% 60% 39% 44%
103Ruby #5 156.52158.177,216987  18% 25% 23% 36%
104Ruby #4 158.82160.17234,576904  32% 45% 10% 16%
122Ruby #2 186.78186.85206,164732  42% 1% 59% 1%
128Python 3 194.57195.845,588792  22% 31% 31% 19%
136Ruby JRuby 214.27207.73664,912760  27% 35% 20% 22%
184Perl #4 281.66282.083,196934  16% 30% 44% 12%
247Perl #2 6 min6 min3,188886  5% 47% 14% 36%
249PHP #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.3Haskell 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