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.0JavaScript V8 #2 3.283.29695,708373  1% 1% 1% 100%
1.6C++ g++ #2 5.225.22202,556695  1% 1% 0% 100%
1.6C++ g++ 5.225.23197,900648  1% 1% 1% 100%
1.6C gcc 5.225.23321,9082579  1% 0% 1% 100%
3.8C++ g++ #4 12.6212.6397,0601759  0% 1% 1% 100%
5.4Ada 2005 GNAT #5 17.7417.76123,8643492  0% 1% 1% 100%
5.8OCaml #2 19.0319.06511,660615  0% 0% 0% 100%
5.9OCaml 19.2219.25511,7241502  0% 0% 0% 100%
5.9OCaml #3 19.2219.26511,7121014  0% 0% 0% 100%
5.9Lua #3 19.2619.27346,052669  0% 0% 0% 100%
6.5Java  #7 21.4021.42563,6361284  0% 1% 1% 100%
6.7Java  #6 22.1822.19518,0681410  0% 1% 1% 100%
7.0OCaml #4 1.4423.16264,7441050  0% 0% 0% 100%
7.0Python 3 23.0823.19257,976478  0% 1% 1% 100%
7.1C gcc #4 23.2223.2387,9321525  0% 1% 1% 100%
7.1Ada 2005 GNAT #6 23.3523.38112,8043740  1% 0% 0% 100%
7.2Java  #5 23.5523.57707,988929  0% 1% 1% 100%
7.2Python 3 #5 23.5823.61326,820424  0% 0% 1% 100%
7.2Java  #4 23.8023.82709,576921  0% 0% 1% 100%
7.7Ruby #6 25.2025.21164,804442  1% 1% 0% 100%
7.9C++ g++ #3 26.0326.05177,352844  0% 1% 1% 100%
8.0PHP #3 26.3426.35219,356459  0% 1% 0% 100%
8.0Clojure #4 26.4026.44617,324707  0% 0% 1% 100%
8.0PHP #4 26.4426.47151,124832  0% 0% 0% 100%
8.1PHP 12.0626.53200,280788  0% 0% 0% 100%
8.1Haskell GHC #2 26.5326.54335,6441518  0% 1% 1% 100%
8.2Scala #5 26.8626.88420,4361704  1% 0% 0% 100%
8.4Hack #3 27.4427.47282,272456  0% 0% 0% 100%
8.4Hack #2 27.4827.51283,148446  1% 0% 0% 100%
8.4Hack 13.0627.77281,000787  0% 0% 1% 100%
8.5Hack #4 27.8027.81150,484832  1% 1% 0% 100%
8.9Ruby #5 29.2429.25154,888343  1% 1% 0% 100%
9.1C gcc #2 30.0430.06126,7641099  1% 1% 1% 100%
9.3Perl #2 30.6930.72139,344527  0% 0% 0% 100%
9.4Lua #2 30.9931.01349,596596  0% 0% 0% 100%
10Scala #2 32.9232.95770,908668  0% 1% 1% 100%
10Ruby #2 33.7733.79389,416417  1% 1% 0% 100%
10PHP #2 34.1734.19207,884449  0% 0% 0% 100%
10Ruby #3 34.2934.31299,328501  0% 1% 0% 100%
12Scala 38.5338.59739,360611  1% 1% 1% 100%
12Racket 40.1040.13713,892527  0% 0% 1% 100%
13Java  #2 40.8441.44576,0721534  0% 1% 1% 100%
13Ruby JRuby #5 41.5441.56981,124343  0% 1% 0% 100%
13Lisp SBCL #3 41.7341.76880,1921948  0% 1% 0% 100%
13Rust 42.0942.11232,492878  1% 0% 0% 100%
13Ruby JRuby #6 42.5242.55982,060442  0% 1% 0% 100%
13Clojure #3 44.2044.25623,768710  0% 0% 1% 100%
13Lua 44.3444.38467,336437  0% 0% 0% 100%
15Ruby 48.4848.50335,824308  0% 1% 0% 100%
16Ruby JRuby #2 52.9352.972,096,420417  1% 1% 1% 100%
16Ruby JRuby #3 53.3253.352,148,788501  0% 1% 0% 100%
18F# Mono 59.9860.05965,664639  1% 0% 1% 100%
18Perl #4 60.2860.31188,604440  0% 0% 0% 100%
19F# Mono #3 60.9561.222,374,492870  1% 1% 1% 100%
19C# Mono #2 62.4862.51289,776594  1% 1% 0% 100%
19F# Mono #2 63.2363.271,048,400413  1% 1% 1% 100%
19C# Mono 63.2363.27768,996624  0% 1% 1% 100%
19C# Mono #6 63.3063.45420,056638  1% 0% 0% 100%
25Ruby JRuby 82.2782.322,174,332308  1% 0% 0% 100%
26Go #8 86.1386.17508,876785  0% 1% 0% 100%
26Go #7 86.3886.42554,256652  1% 1% 0% 100%
30Erlang HiPE #6 98.3798.41210,9201058  0% 0% 0% 100%
37Go 120.81120.87548,932733  1% 0% 1% 100%
107Smalltalk VisualWorks 5 min5 min356,756584  0% 0% 0% 100%
Dart #2 Timed Out5 min648
Erlang HiPE Timed Out10 min622
JavaScript V8 Bad Output365
Lisp SBCL Timed Out10 min591
Racket #2 Bad Output536
Scala #4 Failed723
Scala #3 Failed633
"wrong" (different) algorithm / less comparable programs
1.3Perl #7 4.244.26139,600567
1.3Perl #6 4.424.43190,588477
2.1Erlang HiPE #7 6.997.00237,6321198
2.4Java  #3 7.767.77245,6842084
6.4Pascal 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

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