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.261.4723,6321887  70% 70% 70% 82%
1.2C gcc #6 5.291.812,3521914  89% 53% 54% 100%
1.2Java  #5 5.901.8231,6002457  80% 83% 80% 82%
1.4Haskell GHC #7 3.342.1115,5321550  44% 21% 44% 50%
1.5Haskell GHC #6 6.052.2113,2161567  61% 61% 91% 62%
1.7Go #3 9.252.473,4961344  94% 96% 93% 94%
1.7Haskell GHC #5 3.812.545,0361378  38% 27% 21% 66%
2.0Fortran Intel #4 2.992.992601327  0% 1% 100% 1%
2.2C gcc #5 3.243.256761261  100% 0% 2% 1%
2.5Haskell GHC #2 3.923.652,440979  100% 3% 3% 2%
2.8C# Mono #4 10.734.1783,2641505  59% 77% 63% 61%
2.9C++ g++ #2 4.284.281,1681105  1% 1% 1% 100%
2.9Ada 2005 GNAT #5 4.314.321,7042186  100% 0% 1% 0%
2.9C++ g++ #3 4.334.331,1281286  0% 0% 0% 100%
3.0Fortran Intel #3 4.444.445241190  0% 1% 100% 0%
3.2Java  #4 4.784.6824,9481507  1% 65% 36% 2%
3.3C++ g++ 4.834.841,1681033  0% 100% 1% 0%
3.4C gcc #4 5.025.036321221  0% 0% 0% 100%
3.6Rust 5.255.256,1161211  4% 100% 1% 4%
4.2Scala #3 6.396.2629,4881053  2% 89% 11% 1%
4.3C++ g++ #4 6.266.275841266  0% 100% 1% 0%
4.3Fortran Intel 6.326.335241155  0% 0% 100% 0%
4.8C gcc 7.047.056681185  0% 97% 4% 0%
5.0C# Mono #2 7.327.3338,6481180  99% 1% 1% 1%
5.1Java  #2 7.627.5225,2361240  89% 2% 7% 6%
5.3Lisp SBCL #6 7.867.867,8361751  0% 0% 100% 1%
5.4Pascal Free Pascal #4 7.937.9381112  0% 100% 1% 0%
5.8Go #2 14.008.5111,7921388  78% 53% 24% 12%
5.8Ada 2005 GNAT 8.588.591,6321346  0% 0% 0% 100%
5.9Dart 8.838.7519,8361386  34% 37% 100% 32%
6.5Go 9.569.561,7321036  0% 93% 8% 0%
6.6Clojure #6 11.159.7261,1281692  7% 98% 5% 7%
6.9Scala 10.3010.1330,9281080  2% 99% 1% 2%
7.1F# Mono 10.4910.4940,612978  100% 0% 1% 1%
7.2Clojure #5 12.1810.6363,0761964  23% 62% 27% 7%
8.0Lisp SBCL #3 11.7211.737,8441579  0% 1% 0% 100%
8.2OCaml #3 12.0512.066001042  1% 1% 100% 0%
9.2Racket #3 13.5813.5820,3441276  0% 1% 1% 100%
10Lisp SBCL 14.8314.8324,4921419  1% 0% 100% 0%
11Lisp SBCL #2 16.0516.0624,4841617  0% 1% 100% 1%
31Python 3 #5 127.5445.962,479,9041933  76% 65% 78% 80%
38Erlang HiPE #2 58.3556.2630,3641164  33% 54% 1% 18%
39Racket 56.9456.9322,6561054  0% 48% 53% 0%
74Python 3 #3 109.42109.464,332977  23% 2% 100% 53%
77Perl 113.68113.7251,420838  1% 0% 0% 100%
81PHP #3 118.72118.762,5921030  0% 100% 1% 1%
88Erlang HiPE 178.92129.3612,6241039  14% 22% 54% 51%
98Ruby JRuby #3 150.50144.43322,420973  24% 25% 35% 23%
127Ruby #3 186.43186.7756,588973  12% 46% 35% 10%
162Python 3 238.94239.194,296792  11% 11% 62% 18%
164Ruby #5 240.42240.855,124987  45% 20% 29% 9%
164Ruby #4 240.98241.22197,180904  44% 47% 4% 7%
193Ruby #2 284.20284.29128,236732  16% 42% 1% 42%
204Ruby JRuby 5 min5 min475,864760  30% 24% 24% 27%
211Perl #4 5 min5 min2,560934  20% 38% 7% 38%
253PHP #2 6 min6 min2,5881006  1% 35% 22% 44%
287Perl #2 7 min7 min2,556886  31% 35% 0% 36%
Haskell GHC #4 Bad Output1413
Haskell GHC Bad Output1421
OCaml #6 Failed1161
"wrong" (different) algorithm / less comparable programs
1.6Perl #5 2.302.3015,2321113
1.6C gcc #2 2.392.391,2801169
2.0C++ g++ #5 2.902.911,1761543
8.5Haskell GHC #3 13.4312.538,0361408

 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