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.

     sortsortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0C++ g++ #5 2.312.328721543  1% 0% 0% 100%
1.3Fortran Intel #4 2.992.992601327  0% 1% 100% 1%
1.4C gcc #5 3.293.292841261  2% 1% 1% 100%
1.4Haskell GHC #7 3.342.1115,5321550  44% 21% 44% 50%
1.6Haskell GHC #5 3.812.545,0361378  38% 27% 21% 66%
1.7Haskell GHC #2 3.923.652,440979  100% 3% 3% 2%
1.8C++ g++ #3 4.214.228721286  0% 100% 0% 1%
1.8Ada 2005 GNAT #5 4.244.241,2082186  0% 1% 1% 100%
1.8C++ g++ #2 4.284.286201105  0% 100% 0% 1%
1.9Fortran Intel #3 4.444.445241190  0% 1% 100% 0%
2.1C++ g++ 4.744.756201033  0% 100% 1% 2%
2.2Rust 5.005.014,8441244  2% 2% 2% 100%
2.2C gcc #4 5.055.052841221  1% 100% 1% 1%
2.2Java  #4 5.145.0622,0401507  2% 1% 3% 98%
2.3C gcc #6 5.221.801,3841914  96% 89% 99% 9%
2.3Java  #5 5.231.7329,1042457  70% 68% 95% 70%
2.6Haskell GHC #6 6.052.2113,2161567  61% 61% 91% 62%
2.7Fortran Intel 6.326.335241155  0% 0% 100% 0%
2.8Scala #3 6.506.3923,7081053  5% 97% 2% 1%
2.8C++ g++ #4 6.566.562841266  0% 0% 1% 100%
2.8Go #3 6.581.902,7601344  87% 86% 89% 87%
3.0C gcc 7.047.042841185  0% 100% 0% 1%
3.1C# Mono #2 7.167.1719,4121180  1% 100% 1% 1%
3.4Java  #2 7.927.8122,6961240  1% 8% 92% 1%
3.4Pascal Free Pascal #4 7.937.9381112  0% 100% 1% 0%
3.5Lisp SBCL #6 8.208.217,9801751  1% 1% 0% 100%
3.8Dart 8.708.6023,2001386  0% 1% 2% 100%
3.8Go 8.778.777601036  0% 1% 1% 100%
3.9Ada 2005 GNAT 9.099.101,2081346  1% 0% 100% 1%
4.1C# Mono #4 9.589.5943,3681505  1% 90% 0% 11%
4.4F# Mono 10.1210.1220,400978  1% 0% 100% 1%
4.5Scala 10.3810.2423,5521080  1% 16% 85% 1%
4.8Clojure #6 11.089.6954,6961653  6% 7% 96% 7%
5.1Lisp SBCL #3 11.8811.887,7281579  1% 1% 100% 0%
5.2OCaml #3 12.0512.066001042  1% 1% 100% 0%
5.6Clojure #5 13.0011.2660,2161839  5% 10% 96% 7%
5.9Go #2 13.538.2710,3801388  33% 57% 49% 27%
6.0Racket #3 13.9013.9117,6601276  0% 0% 100% 0%
6.4Lisp SBCL 14.7014.7125,1561419  0% 1% 1% 100%
7.0Lisp SBCL #2 16.1216.1325,1521617  1% 1% 100% 0%
22Erlang HiPE #2 49.8749.8824,1161164  1% 1% 1% 99%
22Racket 50.6350.6216,3641054  0% 1% 100% 0%
42Erlang HiPE 97.2997.3215,2881039  100% 1% 0% 1%
46Python 3 #3 105.28105.324,332977  0% 0% 100% 1%
49Perl 113.68113.7251,420838  1% 0% 0% 100%
51PHP #3 118.72118.762,5921030  0% 100% 1% 1%
55Python 3 #5 127.4746.442,478,0681933  61% 82% 65% 77%
69Python 3 #4 158.52158.914,328965  17% 81% 2% 1%
104Ruby #5 240.42240.855,124987  45% 20% 29% 9%
104Ruby #4 240.98241.22197,180904  44% 47% 4% 7%
104Python 3 #2 241.56246.324,324788  30% 24% 15% 33%
108Python 3 248.61253.034,324792  22% 24% 25% 31%
117Ruby JRuby 270.58264.02635,484760  14% 14% 43% 33%
123Ruby #2 284.20284.29128,236732  16% 42% 1% 42%
134Perl #4 5 min5 min2,560934  20% 38% 7% 38%
161PHP #2 6 min6 min2,5881006  1% 35% 22% 44%
183Perl #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.0Perl #5 2.302.3015,2321113
1.1C gcc #2 2.462.464001169
5.8Haskell 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