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.202.59287,9002579  46% 70% 51% 74%
1.5C++ g++ #2 5.383.83171,652695  1% 65% 76% 2%
1.8C++ g++ #4 13.824.6995,1761759  90% 97% 51% 59%
2.1C++ g++ 5.345.35186,252648  1% 0% 1% 100%
2.2Ada 2005 GNAT #5 17.865.61171,9403492  79% 70% 73% 98%
3.1Ada 2005 GNAT #6 23.907.91105,3563740  70% 69% 65% 100%
3.1C gcc #4 23.847.9391,5521525  63% 66% 72% 100%
3.3Scala #5 29.818.54446,2401704  90% 86% 89% 85%
3.4Haskell GHC #2 33.458.76200,3921518  96% 93% 96% 98%
3.4Clojure #4 28.088.84797,168707  72% 72% 88% 86%
3.5Java  #5 26.349.02714,924929  64% 75% 86% 67%
3.7PHP #4 26.749.65150,664832  60% 53% 95% 70%
3.8Scala #2 27.269.81571,844668  83% 65% 61% 71%
4.2PHP 12.1410.77215,748788  62% 47% 57% 82%
4.2Python 3 23.8111.01248,260478  37% 72% 45% 64%
4.3Erlang HiPE #6 39.8211.17283,5521058  93% 90% 89% 86%
4.9Java  #2 39.8912.61731,6441534  70% 81% 80% 86%
5.0Ruby #8 37.6113.00115,136529  64% 61% 75% 91%
5.3Ruby #7 38.1213.80198,916507  63% 64% 80% 70%
5.3Perl #2 34.5613.84140,296527  36% 77% 59% 78%
5.3Rust 42.0313.87226,152763  73% 86% 88% 89%
6.4Go #2 48.3516.461,153,468789  65% 65% 78% 87%
7.2Ruby JRuby #7 54.8218.63797,864507  86% 67% 66% 77%
7.7C++ g++ #3 30.8419.98177,740844  94% 1% 60% 1%
7.9Ruby #3 44.8020.52252,720501  42% 39% 48% 91%
7.9Lisp SBCL #3 43.1220.54663,1161948  37% 40% 45% 89%
8.0Java  #7 21.2420.78562,9881284  17% 1% 84% 1%
8.1Java  #8 21.4021.06563,0281377  1% 1% 1% 100%
9.1F# Mono #3 71.3723.602,414,396870  89% 74% 70% 70%
9.2Python 3 #5 23.9623.97247,792424  0% 1% 1% 100%
9.8Clojure #3 47.0825.34871,904710  64% 40% 44% 40%
9.8F# Mono 84.2125.41968,460639  83% 84% 85% 81%
9.9Ruby JRuby #2 65.8225.662,067,048417  65% 58% 53% 82%
10Go #8 85.9026.161,158,596785  77% 85% 75% 92%
10Ruby JRuby #3 69.3926.352,024,972501  95% 59% 59% 52%
10PHP #3 26.4826.50212,432459  0% 0% 0% 100%
11Java  #4 29.4127.77739,244921  13% 5% 3% 87%
11F# Mono #4 89.2227.801,106,068899  84% 85% 77% 76%
12Ruby #6 29.9729.98143,860442  1% 1% 100% 1%
12C gcc #2 30.1830.20125,8921099  0% 1% 0% 100%
13Scala 38.2734.46748,472611  87% 16% 6% 6%
13C# Mono #6 90.4634.55342,492638  79% 64% 60% 60%
13PHP #2 34.5534.57221,796449  0% 1% 1% 100%
14Ruby #5 37.3637.38152,748343  0% 1% 1% 100%
15Racket 39.8639.85669,612527  1% 1% 1% 100%
17Ruby #2 44.7644.78261,780417  21% 16% 35% 30%
17Ruby JRuby #5 50.4244.86939,776343  37% 7% 62% 8%
20Go 162.8251.401,239,576733  94% 75% 73% 76%
22Ruby JRuby #6 62.2855.891,028,388442  17% 17% 32% 47%
23Ruby 60.6360.65229,688308  1% 1% 100% 1%
28C# Mono #2 73.1573.17326,040594  2% 49% 7% 44%
29C# Mono 74.1474.171,059,836624  1% 98% 0% 2%
29F# Mono #2 74.5474.571,525,188413  1% 1% 0% 100%
33Go #7 86.7085.831,046,540652  12% 30% 60% 1%
33Perl #4 86.1886.21189,272440  49% 0% 0% 51%
38Ruby JRuby 109.1899.752,112,776308  29% 17% 62% 4%
Dart #2 Timed Out1h 00 min648
Erlang HiPE Timed Out5 min622
Java  #6 Failed1410
Lisp SBCL Timed Out5 min591
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.2Java  #3 8.493.17263,5882084
1.2Erlang HiPE #7 7.893.22278,1201198
1.3Perl #7 4.733.41140,028567
1.9Perl #6 4.974.98188,520477
8.3Pascal 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