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.

     sortsortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0OCaml #4 1.3221.41267,5161050  0% 1% 1% 100%
2.6JavaScript V8 #2 3.403.40640,788373  1% 1% 1% 100%
3.0Hack 3.967.33246,464787  1% 1% 2% 100%
4.0C++ g++ #2 5.225.22202,556695  1% 1% 0% 100%
4.0C++ g++ 5.225.23197,900648  1% 1% 1% 100%
4.0C gcc 5.225.23321,9082579  1% 0% 1% 100%
5.3Hack #2 7.017.02234,044446  0% 1% 0% 100%
5.3Hack #3 7.017.02229,956456  1% 1% 1% 100%
5.6Hack #4 7.407.40176,936832  0% 1% 1% 100%
9.5PHP 12.5227.45216,168788  0% 1% 1% 100%
9.6C++ g++ #4 12.6212.6397,0601759  0% 1% 1% 100%
13Ada 2005 GNAT #5 17.7417.76123,8643492  0% 1% 1% 100%
14OCaml #2 18.9318.95517,500615  1% 0% 0% 100%
15OCaml #3 19.1619.17517,0801014  1% 0% 1% 100%
15OCaml 19.5619.57516,3481502  1% 0% 1% 100%
16Java  #8 20.9420.95567,2761377  2% 9% 1% 100%
18Python 3 23.1523.26254,316478  1% 1% 0% 100%
18Java  #5 23.1823.19766,072929  1% 1% 0% 100%
18C gcc #4 23.2223.2387,9321525  0% 1% 1% 100%
18Java  #7 23.3023.31566,6281284  1% 1% 0% 100%
18Ada 2005 GNAT #6 23.3523.38112,8043740  1% 0% 0% 100%
18Java  #4 23.4623.47842,236921  1% 0% 0% 100%
18Python 3 #5 23.4923.51326,860424  0% 1% 0% 100%
18Ruby #6 24.3224.33145,900442  0% 1% 0% 100%
19Scala #2 24.5224.53655,868668  1% 0% 1% 100%
19Clojure #4 25.3225.34691,820707  1% 1% 0% 100%
20C++ g++ #3 26.0326.05177,352844  0% 1% 1% 100%
20Perl #2 26.4626.47142,256527  0% 1% 0% 100%
21PHP #3 27.3527.36217,384459  1% 1% 0% 100%
21PHP #4 27.5027.52153,008832  0% 0% 1% 100%
21Scala #5 27.7827.80466,3401704  0% 1% 0% 100%
21Ruby #8 27.9427.95115,976529  0% 1% 1% 100%
21Ruby #5 28.0128.02106,264343  0% 1% 0% 100%
21Ruby #2 28.1128.12447,528417  0% 1% 0% 100%
23C gcc #2 30.0430.06126,7641099  1% 1% 1% 100%
23Ruby #3 30.7430.77381,780501  0% 0% 1% 100%
24Lua #2 31.0431.05379,828596  1% 1% 0% 100%
24Ruby #7 31.2931.32217,420507  0% 0% 1% 100%
24Dart #2 32.1232.14335,944648  0% 1% 1% 100%
25Erlang HiPE #6 32.9632.97236,2881058  1% 0% 0% 100%
25Java  #2 33.3433.36763,2721534  1% 1% 1% 100%
26Perl #4 34.3734.38142,024440  1% 0% 0% 100%
26Haskell GHC #2 34.5534.57343,0921518  0% 1% 1% 100%
28Scala 37.2237.25861,140611  0% 1% 1% 100%
29PHP #2 37.6537.66229,104449  1% 1% 1% 100%
30Racket 40.2040.23731,952527  0% 1% 0% 100%
31Ruby JRuby #5 40.4540.48981,456343  1% 0% 0% 100%
31Ruby 40.5140.52375,868308  0% 1% 0% 100%
32Ruby JRuby #6 42.7142.75976,416442  0% 0% 1% 100%
32Lua 42.7942.82441,680437  0% 1% 0% 100%
33Lisp SBCL #3 43.0143.03581,7361948  0% 0% 0% 100%
33Clojure #3 43.0743.11782,528710  0% 1% 1% 100%
36Go #2 48.0948.11466,744789  0% 1% 0% 100%
46C# Mono #7 61.1861.29471,372898  1% 0% 0% 100%
47F# Mono #4 61.4961.52989,852899  1% 1% 0% 100%
47F# Mono 62.5062.53996,140639  0% 1% 1% 100%
48F# Mono #3 63.2763.302,387,044870  0% 1% 0% 100%
50C# Mono #6 65.8065.84271,844638  0% 1% 1% 100%
50C# Mono #2 66.5066.53275,404594  0% 0% 1% 100%
51C# Mono 67.0567.09611,776624  0% 1% 0% 100%
51F# Mono #2 67.4767.50834,448413  0% 1% 0% 100%
55Ruby JRuby 72.5772.632,048,076308  1% 0% 0% 100%
66Go #8 86.6286.66513,492785  0% 1% 1% 100%
66Go #7 87.0587.08461,256652  0% 0% 1% 100%
110Go 145.22146.02576,500733  0% 1% 1% 100%
199Ruby JRuby #7 261.66261.78781,332507  0% 1% 1% 100%
297Ruby JRuby #2 6 min6 min2,150,896417  0% 1% 1% 100%
311Ruby JRuby #3 6 min6 min2,152,332501  1% 0% 0% 100%
492Smalltalk VisualWorks 10 min10 min375,168584  0% 1% 1% 100%
Erlang HiPE Timed Out10 min622
Java  #6 Failed1410
JavaScript V8 Bad Output365
Lisp SBCL Bad Output591
Lua #3 Failed669
Racket #2 Bad Output536
Ruby JRuby #8 Failed529
Rust Make Error748
Scala #4 Failed723
Scala #3 Failed633
"wrong" (different) algorithm / less comparable programs
3.1Perl #6 4.044.05192,408477
3.1Perl #7 4.064.07141,456567
4.9Erlang HiPE #7 6.416.42235,8321198
5.8Java  #3 7.677.67270,7722084
16Pascal Free Pascal 21.0421.05111,8161199
missing benchmark programs
Fortran Intel No program
Pascal Free Pascal No program

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

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 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