/mobile Handheld Friendly website

 regex-dna benchmark ≈50MB N=5,000,000

Each chart bar shows how many times slower, one ↓ regex-dna 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.0C gcc 6.432.78293,0682579  69% 43% 48% 74%
1.6C++ g++ #2 5.974.42179,480695  1% 77% 58% 1%
1.7C++ g++ #4 14.124.8191,2321759  90% 87% 67% 51%
2.1C++ g++ 5.935.95176,844648  1% 1% 100% 3%
2.3Ada 2005 GNAT #6 19.656.4793,0763740  67% 70% 72% 96%
2.3C gcc #4 19.586.51112,9161525  72% 64% 100% 66%
2.6Ada 2005 GNAT #5 19.447.1098,2203492  64% 56% 57% 98%
3.2Haskell GHC #2 33.458.76200,3921518  96% 93% 96% 98%
3.2Clojure #4 28.529.02634,928707  72% 75% 72% 97%
3.3Java  #5 26.449.20713,236929  80% 66% 77% 65%
3.5PHP #4 26.749.65150,664832  60% 53% 95% 70%
3.9PHP 12.1410.77215,748788  62% 47% 57% 82%
4.0Python 3 23.8111.01248,260478  37% 72% 45% 64%
4.5Java  #2 39.1612.47710,7481534  79% 70% 74% 92%
5.0Perl #2 34.5613.84140,296527  36% 77% 59% 78%
5.9Scala #2 36.3416.40864,252668  46% 68% 41% 68%
7.1C++ g++ #3 31.0219.83179,788844  0% 1% 57% 100%
7.2Ruby #3 42.9019.90271,304501  37% 41% 100% 38%
7.5Lisp SBCL #3 43.9420.90868,0441948  40% 92% 41% 38%
7.5Java  #7 21.2520.93558,5001284  97% 2% 4% 1%
8.0Go #8 72.3422.25630,192785  77% 85% 75% 89%
8.4Ruby JRuby #3 62.6023.382,049,368501  61% 60% 63% 84%
8.6Ruby JRuby #2 62.9923.752,003,700417  57% 63% 82% 64%
8.6Python 3 #5 23.9623.97247,792424  0% 1% 1% 100%
8.7Java  #4 25.8224.24725,364921  92% 6% 3% 7%
9.0F# Mono #3 76.2525.062,337,488870  68% 72% 73% 92%
9.0F# Mono 82.2425.09958,276639  86% 82% 77% 84%
9.2C gcc #2 25.5925.60124,6961099  0% 1% 1% 100%
9.3Clojure #3 49.0125.90901,928710  29% 60% 62% 40%
9.5PHP #3 26.4826.50212,432459  0% 0% 0% 100%
10Ruby #6 28.2728.28162,528442  0% 0% 0% 100%
11C# Mono #6 78.5031.81376,872638  67% 53% 51% 77%
12PHP #2 34.5534.57221,796449  0% 1% 1% 100%
13Scala 39.0135.12747,980611  18% 61% 5% 29%
13Ruby #5 35.9435.95103,552343  0% 0% 100% 0%
14Racket 39.8639.85669,612527  1% 1% 1% 100%
15Ruby JRuby #5 47.6742.28909,128343  13% 90% 5% 7%
15Ruby #2 42.8442.86348,968417  15% 19% 21% 46%
17Go 151.2148.46666,372733  75% 74% 74% 91%
19Erlang HiPE #6 185.5452.36208,5721058  82% 97% 95% 80%
19Ruby JRuby #6 59.2053.68927,640442  32% 5% 43% 31%
21Ruby 57.2757.29319,148308  0% 0% 0% 100%
26Go #7 72.5671.81512,752652  1% 42% 1% 59%
27C# Mono #2 76.3276.35340,588594  1% 55% 0% 44%
29F# Mono #2 79.2879.331,756,272413  1% 99% 0% 1%
29C# Mono 81.6581.701,002,388624  100% 1% 0% 0%
31Ruby JRuby 93.4585.072,101,424308  14% 89% 4% 5%
31Perl #4 86.1886.21189,272440  49% 0% 0% 51%
Dart Failed632
Dart #2 Timed Out5 min648
Erlang HiPE Timed Out10 min622
Java  #6 Failed1410
Lisp SBCL Timed Out10 min591
OCaml #4 Failed1050
OCaml #2 Failed615
OCaml Failed1502
OCaml #3 Failed1014
Racket #2 Bad Output536
Scala #3 Failed633
Scala #4 Failed723
"wrong" (different) algorithm / less comparable programs
1.1Erlang HiPE #7 8.212.96261,9921198
1.2Java  #3 8.603.34257,5362084
1.2Perl #7 4.733.41140,028567
1.8Perl #6 4.974.98188,520477
7.4Pascal Free Pascal 20.4920.50113,9161199
missing benchmark programs
Fortran Intel No program
Pascal Free Pascal No program
Rust No program

 regex-dna benchmark : Match DNA 8-mers and substitute nucleotides for IUB codes

diff program output for this 100KB input file (generated with the fasta program N = 10000) with this 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.

We use FASTA files generated by the fasta benchmark as input for this benchmark. Note: the file may include both lowercase and uppercase codes.

Each program should

Revised BSD license

  Home   Conclusions   License   Play