The Computer Language
Benchmarks Game

reverse-complement

program source code, command-line and measurements

× source secs mem gz cpu cpu load
1.0 C gcc #4 1.08 102,984 704 1.08 2% 0% 3% 100%
1.2 Pascal Free Pascal #2 1.92 124,784 751 1.92 2% 1% 100% 0%
1.2 Ada 2005 GNAT 2.73 126,808 885 2.73 1% 3% 100% 1%
1.2 C++ g++ #3 1.13 127,072 810 1.12 4% 100% 3% 1%
1.3 Ruby #2 8.14 133,304 255 8.13 100% 0% 0% 1%
1.3 Go #6 0.49 133,532 1278 0.87 76% 30% 27% 49%
1.3 Haskell GHC #3 1.29 133,992 999 1.36 5% 100% 4% 5%
1.3 OCaml #4 1.50 138,776 2064 1.49 7% 3% 100% 5%
1.4 C gcc #6 0.42 143,948 812 0.58 15% 26% 98% 2%
1.5 Fortran Intel 1.02 150,284 1013 1.01 100% 1% 1% 0%
1.6 C++ g++ #5 19.01 160,680 646 19.00 1% 0% 100% 1%
1.6 Go #3 0.87 165,948 543 0.89 3% 3% 88% 11%
1.6 Go #2 0.92 165,960 546 0.94 3% 2% 4% 97%
1.7 Fortran Intel #2 8.01 177,800 772 8.00 1% 1% 100% 1%
1.8 Racket #2 4.24 184,284 1026 4.23 100% 1% 1% 0%
1.9 Java  #8 1.13 199,672 2124 2.76 48% 74% 70% 54%
2.0 Ada 2005 GNAT #2 0.69 202,188 3220 0.80 80% 6% 1% 35%
2.0 OCaml #2 5.07 210,132 394 5.06 100% 1% 0% 1%
2.0 Swift 0.86 210,216 1287 1.03 79% 2% 1% 42%
2.1 C++ g++ #4 0.60 211,852 2275 0.98 38% 25% 82% 27%
2.4 TypeScript 4.24 243,660 1131 4.50 29% 33% 3% 44%
2.4 Node.js #7 4.30 243,956 1088 4.63 5% 93% 7% 3%
2.4 Node.js #2 6.54 244,484 1202 6.83 44% 24% 34% 5%
2.4 C++ g++ 2.59 247,896 571 2.58 1% 1% 100% 1%
2.4 C++ g++ #2 0.79 248,924 1082 1.07 13% 13% 41% 73%
2.4 C gcc #5 0.72 249,620 638 0.71 100% 3% 1% 0%
2.4 C gcc #2 0.53 251,496 741 0.79 21% 48% 67% 19%
2.5 Go 0.84 258,940 1243 0.98 20% 73% 20% 10%
2.5 Rust 0.69 261,392 1807 0.96 16% 30% 72% 25%
2.6 Python 3 #6 2.82 265,428 800 4.18 46% 32% 20% 54%
2.6 Rust #3 0.48 268,504 1330 0.76 23% 22% 96% 23%
2.6 Rust #2 0.33 270,416 1324 0.62 30% 34% 100% 32%
2.9 C# .NET Core 1.70 299,096 1099 1.70 99% 1% 0% 4%
2.9 Chapel 1.46 300,412 643 2.11 98% 19% 22% 10%
3.0 C# .NET Core #6 0.79 307,604 1584 1.84 89% 75% 51% 24%
3.1 C# .NET Core #5 1.16 317,548 1580 1.83 83% 23% 4% 52%
3.1 Java #5 1.65 321,312 1098 1.92 20% 44% 45% 9%
3.2 C gcc 0.57 325,800 1867 0.90 0% 82% 35% 45%
3.2 Smalltalk VW 30.82 332,960 906 30.78 1% 1% 1% 100%
3.5 Go #5 1.34 358,920 926 1.77 65% 28% 34% 13%
3.5 PHP 3.82 359,768 297 3.81 1% 100% 1% 0%
3.7 Perl #3 2.67 378,924 284 2.67 100% 0% 1% 0%
3.7 Java #3 1.34 382,668 1661 2.90 38% 54% 41% 88%
3.7 Lua #4 21.88 383,448 594 21.84 1% 61% 0% 40%
3.8 Java #4 2.18 392,688 592 2.40 7% 94% 10% 2%
3.9 C++ g++ #6 1.38 399,452 1752 2.10 31% 24% 99% 7%
3.9 Lisp SBCL 2.43 405,052 896 2.43 100% 0% 1% 1%
4.3 PHP #2 4.23 438,248 262 4.22 2% 0% 1% 100%
4.6 Racket 13.20 474,536 547 13.19 14% 0% 1% 87%
4.9 Ruby #3 4.03 505,656 509 7.14 51% 83% 37% 9%
5.0 Erlang HiPE #4 47.87 516,388 1167 62.83 56% 52% 15% 10%
5.2 C# .NET Core #4 1.44 530,808 1708 2.06 21% 9% 22% 93%
5.2 Java #6 1.39 538,492 745 1.74 8% 35% 8% 78%
5.9 Erlang #4 40.53 609,092 1167 52.35 11% 21% 58% 42%
6.1 C# .NET Core #3 5.00 626,108 863 6.69 66% 13% 41% 16%
6.5 Ruby 5.66 671,980 536 10.35 93% 59% 27% 6%
7.2 Lua #2 17.44 740,584 553 17.43 100% 1% 1% 0%
7.3 C# .NET Core #2 1.40 756,508 1670 2.25 23% 59% 13% 71%
8.3 Erlang HiPE 10.86 855,552 1302 27.02 59% 63% 79% 50%
8.8 Erlang 9.36 902,492 1302 21.31 65% 65% 47% 53%
9.1 Haskell GHC #2 2.67 940,212 919 2.84 93% 3% 3% 10%
9.8 Python 3 #4 5.60 1,012,584 325 5.58 1% 100% 1% 0%
11 Ruby JRuby #2 16.89 1,123,272 255 25.13 20% 58% 26% 47%
12 F# .NET Core 11.90 1,199,404 588 13.20 7% 96% 6% 6%
12 Erlang #3 68.35 1,230,964 624 70.04 52% 30% 23% 0%
14 Erlang HiPE #3 58.94 1,396,036 624 62.15 12% 54% 39% 4%
17 Dart #2 29.84 1,712,724 555 35.34 37% 12% 45% 27%
17 Dart #3 23.60 1,717,368 551 29.00 25% 22% 24% 54%
21 Ruby JRuby #3 8.77 2,206,072 509 24.43 76% 66% 70% 69%
23 Ruby JRuby 10.29 2,416,972 536 31.43 74% 74% 78% 83%
Hack Bad Output
Hack #2 Bad Output
Java #7 Partial
OCaml Partial
OCaml #3 Partial
PHP #3 Partial