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.293.30484,640373  0% 1% 1% 100%
1.6C++ g++ #2 5.335.34170,488695  0% 0% 1% 100%
1.6C++ g++ 5.355.36181,908648  1% 1% 1% 100%
1.6C gcc 5.375.38288,9842579  1% 1% 0% 100%
4.2C++ g++ #4 13.7813.7995,1721759  0% 1% 1% 100%
5.3Ada 2005 GNAT #5 17.5817.60171,7603492  0% 1% 1% 100%
6.0Lua #3 19.6919.71224,592669  0% 0% 0% 100%
6.7Java  #7 22.2722.28558,3201284  1% 1% 0% 100%
7.3Python 3 #5 23.9223.94247,788424  0% 1% 1% 100%
7.3C gcc #4 23.9523.9683,0921525  1% 0% 0% 100%
7.3Ada 2005 GNAT #6 23.9623.98114,2203740  0% 1% 1% 100%
7.3Python 3 24.0424.16236,128478  0% 1% 1% 100%
7.6Java  #4 25.0825.10734,540921  1% 1% 0% 100%
7.8Java  #5 25.8725.89729,500929  1% 1% 0% 100%
8.0PHP #3 26.5026.52219,260459  1% 0% 0% 100%
8.1PHP 12.1126.62220,732788  0% 0% 0% 100%
8.1PHP #4 26.6826.70150,660832  0% 0% 0% 100%
8.5Ruby #6 28.1428.15162,792442  0% 1% 1% 100%
8.5Haskell GHC #2 28.1828.19241,3721518  0% 0% 1% 100%
9.2C gcc #2 30.2030.21125,8881099  0% 1% 1% 100%
9.2Lua #2 30.2330.25350,336596  0% 0% 0% 100%
9.2Scala #5 30.3430.36469,8401704  1% 2% 3% 100%
9.4Perl #2 30.8830.92140,068527  0% 0% 0% 100%
9.4C++ g++ #3 31.0231.03177,200844  0% 1% 1% 100%
10Java  #2 34.5134.53705,8641534  1% 0% 0% 100%
10PHP #2 34.5834.60221,252449  0% 0% 0% 100%
11Scala #2 34.8434.86864,848668  0% 1% 0% 100%
11Ruby #5 35.9435.96103,552343  0% 1% 1% 100%
11Scala 36.1836.22847,908611  0% 1% 0% 100%
12Racket 39.8839.91642,384527  0% 0% 1% 100%
13Lisp SBCL #3 41.9541.97845,1361948  1% 1% 0% 100%
13Ruby #2 42.5142.53349,000417  0% 1% 0% 100%
13Ruby #3 43.0243.06271,304501  1% 1% 1% 100%
13Lua 43.9043.94494,992437  0% 0% 0% 100%
14Rust 46.7246.75232,468878  1% 1% 0% 100%
15Clojure #3 48.3548.38524,580710  0% 0% 1% 100%
15Ruby JRuby #5 49.1649.201,003,532343  0% 1% 1% 100%
17Ruby 57.4557.48301,984308  1% 1% 1% 100%
18Ruby JRuby #3 59.0659.112,030,980501  0% 1% 1% 100%
18Ruby JRuby #2 59.2659.312,100,456417  0% 1% 1% 100%
18Ruby JRuby #6 59.8259.86932,816442  0% 0% 0% 100%
20F# Mono 67.0067.031,124,424639  0% 1% 1% 100%
20F# Mono #3 67.1367.162,365,616870  0% 1% 0% 100%
22C# Mono #6 70.9971.03281,180638  0% 1% 1% 100%
22C# Mono #2 71.2571.28279,548594  1% 1% 0% 100%
22F# Mono #2 72.4272.451,590,332413  0% 3% 3% 100%
22C# Mono 72.7072.73885,424624  1% 1% 1% 100%
22Perl #4 73.3473.37188,720440  0% 0% 0% 100%
26Go #8 85.0485.081,362,536785  1% 1% 0% 100%
26Go #7 85.3785.411,191,260652  0% 1% 0% 100%
31Ruby JRuby 101.11101.181,922,596308  1% 0% 0% 100%
35Erlang HiPE #6 114.18114.22145,4761058  0% 0% 0% 100%
40Go 131.21131.271,237,232733  1% 1% 0% 100%
97Smalltalk VisualWorks 5 min5 min376,248584  0% 0% 0% 100%
C CINT #2 Failed1099
C CINT Bad Output1101
Clojure #4 Failed707
Dart #2 Timed Out5 min648
Erlang HiPE Timed Out10 min622
Java  #6 Failed1410
JavaScript V8 Bad Output365
Lisp SBCL Timed Out10 min591
OCaml #4 Failed1050
OCaml #2 Failed615
OCaml Failed1502
OCaml #3 Failed1014
Racket #2 Bad Output536
Scala #3 Failed633
Scala #4 Failed723
"wrong" (different) algorithm / less comparable programs
1.3Perl #7 4.394.41139,804567
1.4Perl #6 4.604.61189,608477
2.2Erlang HiPE #7 7.387.39145,8401198
2.5Java  #3 8.238.24257,7762084
6.6Pascal Free Pascal 21.6521.66111,8841199
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