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.0Rust #2 2.962.96189,040669  0% 1% 0% 100%
1.2JavaScript V8 #2 3.443.45642,500405  0% 1% 2% 100%
1.7C gcc 5.085.09323,5722579  0% 1% 0% 100%
1.8C++ g++ 5.245.25208,928648  1% 1% 0% 100%
1.8C++ g++ #2 5.255.26211,232695  0% 1% 0% 100%
1.8Hack #3 5.315.33286,192456  0% 1% 1% 100%
1.8Hack #2 5.325.33290,204446  0% 2% 0% 100%
1.9Hack 3.335.64288,064787  1% 1% 1% 100%
1.9Hack #4 5.715.73218,288832  1% 1% 1% 100%
4.5C++ g++ #4 13.3213.3399,0521759  1% 0% 0% 100%
5.5Ada 2005 GNAT #5 16.3816.40175,4643492  1% 0% 0% 100%
6.4OCaml #2 18.9318.95517,500615  1% 0% 0% 100%
6.5OCaml #3 19.1619.17517,0801014  1% 0% 1% 100%
6.6OCaml 19.5619.57516,3481502  1% 0% 1% 100%
7.2Java  #7 21.3921.40575,3721284  1% 0% 1% 100%
7.2OCaml #4 1.3221.41267,5161050  0% 1% 1% 100%
7.3Java  #8 21.5521.56574,7041377  1% 1% 0% 100%
7.6C gcc #4 22.5922.6088,1361525  1% 0% 0% 100%
7.7Ada 2005 GNAT #6 22.6322.66113,2203740  1% 1% 0% 100%
7.9Python 3 23.1523.26254,316478  1% 1% 0% 100%
7.9Java  #5 23.3423.35750,952929  1% 1% 1% 100%
7.9Python 3 #5 23.4923.51326,860424  0% 1% 0% 100%
8.0Java  #4 23.6723.69716,328921  0% 1% 1% 100%
8.2Ruby #6 24.3224.33145,900442  0% 1% 0% 100%
8.3Scala #2 24.6824.70691,324668  1% 0% 1% 100%
8.8Scala #5 26.1226.14472,9121704  1% 1% 1% 100%
8.9Perl #2 26.4626.47142,256527  0% 1% 0% 100%
9.2PHP #3 27.3527.36217,384459  1% 1% 0% 100%
9.3PHP 12.5227.45216,168788  0% 1% 1% 100%
9.3Clojure #4 27.4427.47683,964707  1% 1% 0% 100%
9.3PHP #4 27.5027.52153,008832  0% 0% 1% 100%
9.4Ruby #8 27.9427.95115,976529  0% 1% 1% 100%
9.5Ruby #5 28.0128.02106,264343  0% 1% 0% 100%
9.5Ruby #2 28.1128.12447,528417  0% 1% 0% 100%
9.9C gcc #2 29.2029.21127,6041099  1% 1% 0% 100%
10Ruby #3 30.7430.77381,780501  0% 0% 1% 100%
10Lua #2 31.0431.05379,828596  1% 1% 0% 100%
11Ruby #7 31.2931.32217,420507  0% 0% 1% 100%
11Scala 32.0132.03876,188611  1% 0% 1% 100%
11Dart #2 32.7532.77349,052648  1% 0% 0% 100%
11Java  #2 33.2733.29715,0321534  1% 1% 0% 100%
11Erlang HiPE #6 33.4233.44251,0321058  1% 0% 0% 100%
12Perl #4 34.3734.38142,024440  1% 0% 0% 100%
12Haskell GHC #2 34.5534.57343,0921518  0% 1% 1% 100%
13PHP #2 37.6537.66229,104449  1% 1% 1% 100%
14Racket 40.2040.23731,952527  0% 1% 0% 100%
14Ruby JRuby #5 40.4540.48981,456343  1% 0% 0% 100%
14Ruby 40.5140.52375,868308  0% 1% 0% 100%
14Ruby JRuby #6 42.7142.75976,416442  0% 0% 1% 100%
14Clojure #3 42.7642.79805,400710  0% 1% 1% 100%
14Lua 42.7942.82441,680437  0% 1% 0% 100%
15Lisp SBCL #3 43.0143.03581,7361948  0% 0% 0% 100%
16Go #2 48.4648.48619,976789  0% 1% 0% 100%
25Ruby JRuby 72.5772.632,048,076308  1% 0% 0% 100%
26C# Mono #6 77.2777.36379,924638  0% 0% 1% 100%
26C# Mono #2 77.8677.94404,544594  0% 1% 1% 100%
26C# Mono #7 78.0678.18451,556898  0% 1% 0% 100%
27F# Mono #2 79.2379.27672,008413  1% 1% 0% 100%
28C# Mono 82.0782.11453,124624  1% 0% 1% 100%
28F# Mono 82.8282.89817,884639  0% 1% 0% 100%
28F# Mono #4 83.2983.34955,868899  0% 1% 0% 100%
28F# Mono #3 83.6983.762,016,188870  0% 1% 1% 100%
30Go #7 87.3287.35434,740652  0% 1% 0% 100%
30Go #8 87.3787.40575,612785  0% 1% 1% 100%
41Go 122.06122.86739,580733  0% 0% 0% 100%
88Ruby JRuby #7 261.66261.78781,332507  0% 1% 1% 100%
132Ruby JRuby #2 6 min6 min2,150,896417  0% 1% 1% 100%
138Ruby JRuby #3 6 min6 min2,152,332501  1% 0% 0% 100%
221Smalltalk VisualWorks 10 min10 min376,108584  0% 1% 1% 100%
C++ g++ #3 Make Error844
Erlang HiPE Timed Out15 min622
Java  #6 Failed1410
JavaScript V8 Bad Output396
Lisp SBCL Bad Output591
Lua #3 Failed669
Racket #2 Bad Output536
Ruby JRuby #8 Failed529
Scala #4 Failed723
Scala #3 Failed633
"wrong" (different) algorithm / less comparable programs
1.4Perl #6 4.044.05192,408477
1.4Perl #7 4.064.07141,456567
2.3Erlang HiPE #7 6.676.68250,3721198
2.6Java  #3 7.627.63276,6162084
7.1Pascal 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