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.0Go #3 6.171.802,8561344  85% 85% 86% 89%
1.1C gcc #6 5.721.945,0401914  89% 99% 63% 47%
1.2Java  #5 5.782.1633,6402457  84% 59% 61% 66%
1.5Fortran Intel #4 2.702.702441327  1% 0% 0% 100%
1.7Go #2 6.653.0611,1721388  44% 74% 54% 46%
1.9C gcc #5 3.393.393641261  2% 0% 1% 100%
2.2Haskell GHC #2 4.494.022,732979  5% 6% 100% 5%
2.3Ada 2005 GNAT #5 4.114.111,4922186  0% 1% 100% 2%
2.4C++ g++ #3 4.234.231,0721286  1% 95% 1% 5%
2.5C++ g++ #2 4.444.458281105  1% 0% 0% 100%
2.5Fortran Intel #3 4.464.465081190  0% 0% 0% 100%
2.6C++ g++ 4.684.688241033  0% 1% 1% 100%
2.8Rust 4.995.004,8121224  1% 0% 100% 0%
2.9Java  #4 5.365.2827,0241507  3% 96% 1% 3%
3.3Fortran Intel 5.975.975081155  0% 0% 0% 100%
3.4C gcc #4 6.066.073601221  1% 0% 100% 0%
3.5C++ g++ #4 6.256.253601266  1% 0% 1% 100%
3.5C# Mono #2 6.326.3322,2201180  0% 1% 0% 100%
3.5Scala #3 6.466.3530,7201053  6% 94% 1% 3%
3.7Clojure #6 7.976.6473,5001653  5% 50% 8% 58%
4.0C gcc 7.267.263641185  0% 1% 100% 1%
4.1Go 7.317.311,0241036  0% 1% 0% 100%
4.3Lisp SBCL #6 7.797.808,8601751  1% 1% 0% 100%
4.4Java  #2 8.098.0027,1681240  2% 98% 1% 2%
4.6F# Mono 8.248.2421,504978  0% 0% 1% 100%
5.0Dart 9.028.9718,6521386  1% 1% 1% 99%
5.2C# Mono #4 9.319.3246,4121505  1% 6% 95% 0%
5.5Lisp SBCL #3 9.819.8110,6681579  1% 100% 0% 0%
5.5Scala 10.119.9829,3881080  100% 1% 2% 1%
5.9OCaml #6 10.5110.52198,0801161  0% 0% 1% 100%
5.9Clojure #5 12.1310.5878,1041839  13% 5% 5% 92%
6.2Pascal Free Pascal #4 11.1311.1481112  0% 1% 100% 1%
6.5Ada 2005 GNAT 11.7411.751,4921346  1% 0% 0% 100%
7.5OCaml #3 13.4113.423,1241042  42% 0% 0% 58%
9.6Racket #3 17.2217.2224,5841276  0% 0% 1% 100%
10Lisp SBCL 17.8117.8210,6721419  1% 100% 1% 0%
10Lisp SBCL #2 18.1018.1110,6601617  1% 0% 0% 100%
15Hack #4 26.2926.30328,5201109  0% 1% 0% 100%
17Erlang HiPE #2 30.9030.9019,9121164  91% 9% 0% 1%
24Hack #3 42.6142.63326,5561029  100% 0% 1% 1%
28Racket 50.3550.3523,1201054  1% 0% 0% 100%
33Hack #2 60.2160.2274,5721003  0% 1% 100% 1%
34Erlang #2 60.6460.6516,2401164  1% 1% 100% 0%
39Erlang HiPE 69.7969.8017,8761039  1% 0% 0% 100%
53Erlang 94.6394.6526,3681039  8% 34% 0% 60%
58Perl 104.98105.03100,328838  0% 100% 0% 0%
76PHP #3 133.11136.583,3281030  60% 36% 4% 0%
83Ruby #5 148.59148.667,652987  18% 23% 32% 29%
85Ruby #4 152.77152.91247,352904  11% 15% 24% 54%
93Python 3 #2 161.75166.415,576788  25% 27% 16% 34%
93Python 3 163.25167.315,584792  32% 35% 20% 15%
111Ruby #2 199.33199.40203,652732  1% 28% 0% 73%
116Ruby JRuby 214.27207.73664,912760  27% 35% 20% 22%
160Perl #4 285.70288.562,388934  1% 1% 0% 99%
213Perl #2 6 min6 min2,648886  37% 63% 0% 0%
239PHP #2 7 min7 min3,3281006  73% 11% 0% 16%
Haskell GHC Bad Output1421
Haskell GHC #4 Bad Output1413
"wrong" (different) algorithm / less comparable programs
1.2Perl #5 2.102.1025,1321113
2.6C gcc #2 4.674.676161169
7.9Haskell GHC #3 15.8214.232,4681408

 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