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.872.05174,524669  14% 62% 15% 54%
1.3C gcc 6.342.67290,7922579  96% 76% 84% 67%
2.0C++ g++ #2 5.574.02176,492695  2% 63% 75% 1%
2.5C++ g++ #4 15.285.0694,6321759  87% 51% 75% 90%
2.7C++ g++ 5.505.51182,988648  2% 1% 100% 2%
3.2Ada 2005 GNAT #5 19.526.55168,0043492  71% 67% 73% 87%
3.6Ada 2005 GNAT #6 22.457.42118,1643740  70% 72% 65% 97%
3.7C gcc #4 22.517.5088,0761525  70% 68% 100% 63%
4.0Scala #5 28.078.25451,9121704  92% 84% 83% 83%
4.3Java  #5 25.798.80729,244929  77% 80% 72% 66%
4.3Clojure #4 28.218.82642,768707  77% 98% 73% 73%
4.7Scala #2 26.119.64684,748668  80% 65% 59% 68%
4.9PHP #4 29.0210.00152,084832  64% 67% 65% 96%
5.1Haskell GHC #2 39.4410.41208,9641518  97% 97% 93% 93%
5.2Python 3 23.4910.58253,208478  47% 39% 94% 43%
5.2Perl #2 27.6210.63142,432527  77% 61% 80% 44%
5.3PHP 12.9410.94222,360788  55% 54% 55% 97%
5.5Erlang HiPE #6 37.3011.35250,6401058  86% 88% 78% 79%
6.0Ruby #3 36.1312.28348,464501  65% 78% 70% 82%
6.1Java  #2 40.0012.59725,0641534  72% 75% 97% 75%
6.3Ruby #8 36.3412.83115,624529  92% 60% 64% 69%
6.7Ruby #7 37.7213.73183,768507  62% 62% 95% 58%
8.4Go #2 49.8117.23532,312789  90% 64% 64% 72%
8.5Ruby JRuby #7 51.5917.44889,692507  69% 71% 82% 76%
9.6C++ g++ #3 31.7019.67180,580844  67% 0% 1% 94%
9.6Java  #8 20.0819.68567,3281377  5% 4% 7% 87%
9.8Java  #7 20.4620.05567,1401284  13% 1% 88% 1%
10Lisp SBCL #3 43.8220.93581,1641948  44% 41% 89% 37%
11Java  #4 24.3722.66735,240921  6% 10% 89% 4%
12Python 3 #5 23.8323.84247,660424  1% 4% 0% 97%
12Ruby JRuby #2 62.6124.232,054,012417  64% 68% 53% 76%
12Ruby JRuby #3 63.0124.381,970,696501  52% 53% 89% 66%
12Clojure #3 47.0225.07837,680710  57% 38% 32% 62%
13Go #8 87.8326.83651,792785  81% 84% 84% 79%
14PHP #3 28.4828.49217,104459  0% 0% 1% 100%
14Ruby #6 28.6328.64144,172442  0% 0% 100% 1%
14C gcc #2 29.6229.64127,7521099  100% 1% 0% 0%
15C# Mono #2 85.2630.15436,508594  61% 60% 64% 99%
15C# Mono #7 87.5530.50428,632898  62% 86% 63% 77%
16Scala 36.8032.42914,460611  12% 10% 63% 30%
16F# Mono 88.6933.18771,596639  93% 59% 60% 58%
16F# Mono #4 91.5633.23979,256899  73% 65% 71% 68%
16F# Mono #3 89.8133.412,003,856870  59% 75% 66% 70%
17Perl #4 34.5534.57141,784440  1% 1% 1% 100%
17C# Mono #6 85.6335.32440,772638  75% 48% 70% 51%
17Ruby #2 35.3335.34431,248417  8% 36% 45% 13%
18Ruby #5 36.3436.36152,548343  1% 0% 0% 100%
19PHP #2 39.2639.27215,568449  0% 0% 1% 100%
19Racket 39.5339.52669,152527  1% 100% 1% 1%
20Go 129.4941.83605,736733  75% 78% 77% 80%
22Ruby JRuby #6 50.6444.93955,792442  34% 6% 22% 52%
22Ruby JRuby #5 50.5145.09755,464343  5% 7% 6% 96%
25Ruby 51.1051.12418,408308  0% 0% 100% 1%
36Dart #2 75.0973.92259,112648  1% 21% 79% 2%
42Go #7 87.5986.89406,392652  93% 4% 3% 2%
43C# Mono 87.9087.93465,540624  100% 1% 1% 0%
43F# Mono #2 88.4788.49654,284413  1% 0% 0% 100%
48Ruby JRuby 110.5899.362,054,228308  8% 77% 23% 5%
Erlang HiPE Timed Out15 min622
Java  #6 Failed1410
Lisp SBCL Bad Output591
OCaml #4 Failed1050
OCaml #2 Failed615
OCaml Failed1502
OCaml #3 Failed1014
Racket #2 Bad Output536
Ruby JRuby #8 Failed529
Scala #3 Failed633
Scala #4 Failed723
"wrong" (different) algorithm / less comparable programs
1.4Perl #7 4.242.88141,904567
1.5Java  #3 8.233.09267,9682084
1.6Erlang HiPE #7 8.233.26281,5521198
2.1Perl #6 4.284.29190,284477
11Pascal Free Pascal 21.6321.64117,8601199
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