The Computer Language
Benchmarks Game

binary-trees

program source code, command-line and measurements

× source secs mem gz cpu cpu load
1.0 Pascal Free Pascal 32.25 65,804 769 32.22 1% 0% 0% 100%
1.0 C gcc 35.84 66,784 706 35.81 1% 1% 0% 100%
1.2 C++ g++ #7 6.86 76,616 846 6.85 0% 1% 0% 100%
1.5 Fortran Intel #2 19.19 99,624 1199 19.17 0% 1% 1% 100%
1.5 C gcc #3 9.58 100,796 906 9.57 1% 1% 1% 100%
1.5 C++ g++ #2 42.74 101,016 553 42.71 1% 1% 0% 100%
1.5 Ada 2005 GNAT 43.88 101,204 955 43.86 0% 1% 1% 100%
1.6 OCaml #2 39.11 102,832 784 39.02 1% 0% 0% 100%
1.6 Ada 2005 GNAT #5 11.09 105,168 2167 11.05 0% 1% 1% 100%
1.6 Ada 2005 GNAT #4 11.06 105,232 2167 11.03 0% 0% 1% 100%
1.7 C gcc #5 74.42 110,536 963 74.37 1% 1% 1% 100%
1.7 F# Mono LLVM #4 19.30 110,552 511 19.26 0% 1% 1% 100%
1.8 Ruby #4 179.60 117,640 402 179.49 1% 1% 100% 100%
1.8 Ruby #5 180.67 117,920 1123 180.54 1% 0% 0% 100%
1.9 Rust 25.58 122,236 792 25.54 1% 0% 0% 100%
2.1 OCaml #5 34.05 139,200 496 34.00 0% 1% 1% 100%
2.2 F# Mono LLVM 26.02 142,892 537 25.98 1% 1% 0% 100%
2.2 C# Mono LLVM #4 44.90 143,692 955 44.72 1% 1% 1% 100%
2.3 F# Mono LLVM #3 36.79 148,852 565 36.73 1% 1% 1% 100%
2.3 C++ g++ #6 11.27 150,264 892 11.26 1% 1% 0% 100%
2.3 Fortran Intel 191.31 153,804 826 191.08 0% 1% 1% 100%
2.5 Ruby #3 228.37 162,880 439 228.24 1% 1% 98% 100%
2.7 Go 173.78 180,880 516 173.67 1% 23% 5% 100%
2.8 C++ g++ #3 11.44 181,440 993 11.42 1% 1% 0% 100%
2.8 Go #9 167.96 184,252 548 167.86 0% 1% 1% 100%
2.8 C# Mono LLVM 52.39 185,768 652 52.30 0% 1% 1% 100%
2.8 Go #7 179.77 186,044 567 179.64 14% 21% 25% 100%
2.9 Haskell GHC #4 16.98 190,168 612 16.95 0% 0% 1% 100%
2.9 Haskell GHC 18.14 190,300 521 18.11 2% 1% 0% 100%
3.0 Lisp SBCL #2 14.66 199,060 649 14.64 0% 1% 1% 100%
3.0 Lisp SBCL 23.19 199,096 612 23.16 0% 1% 1% 100%
3.1 Go #5 180.09 201,728 1000 179.98 0% 1% 1% 100%
3.1 Ruby #2 227.46 206,596 413 227.34 1% 1% 100% 100%
3.1 Ruby 224.90 206,600 412 224.75 1% 1% 48% 100%
3.2 Go #4 180.44 208,416 688 180.33 1% 1% 0% 100%
3.2 Perl 8 min 209,208 448 8 min 1% 1% 1% 100%
3.2 Go #2 183.80 209,572 694 183.67 3% 25% 5% 100%
3.3 F# Mono LLVM #2 69.03 214,520 515 68.92 1% 1% 0% 100%
3.3 Dart 28.71 216,556 503 28.68 1% 0% 1% 100%
3.3 Chapel 62.54 219,460 554 62.50 100% 1% 1% 0%
3.3 Racket #2 24.89 219,988 640 24.85 0% 1% 1% 100%
3.7 Erlang HiPE #2 44.66 242,872 499 44.59 0% 1% 1% 100%
3.9 C# Mono LLVM #2 45.33 259,528 650 45.26 0% 1% 1% 100%
4.1 Racket 35.96 269,104 495 35.90 0% 1% 1% 100%
4.8 Smalltalk VW 65.30 319,024 722 65.23 0% 0% 1% 100%
5.0 Ada 2005 GNAT #3 118.05 331,240 1342 117.98 0% 1% 1% 100%
5.4 PHP 254.41 353,656 504 254.20 1% 1% 1% 100%
5.4 PHP #2 238.44 353,760 472 238.24 1% 1% 1% 100%
7.3 Node.js 47.30 479,436 477 47.21 0% 1% 1% 100%
7.3 Python 3 8 min 482,656 596 8 min 1% 1% 1% 100%
7.4 Scala #5 14 min 483,692 688 14 min 0% 1% 1% 100%
7.5 TypeScript 49.08 492,848 475 49.00 0% 1% 1% 100%
7.5 TypeScript #2 49.23 492,876 470 49.15 1% 0% 1% 100%
7.8 Java  #3 16.53 511,692 584 16.51 1% 1% 0% 100%
7.8 Java #2 16.73 516,400 603 16.70 1% 1% 1% 100%
8.0 Clojure 21.25 525,540 657 21.22 2% 1% 1% 100%
8.0 Clojure #2 23.26 525,932 750 23.23 1% 0% 0% 100%
8.0 Java #6 16.64 527,868 583 16.62 1% 1% 0% 100%
8.1 Scala #4 17.86 530,980 494 17.64 1% 0% 0% 100%
8.5 Clojure #6 27.73 557,132 705 27.70 0% 1% 100% 100%
8.5 Erlang HiPE 35.77 558,720 441 35.72 0% 1% 1% 100%
9.1 Java #4 20.32 599,748 911 20.29 1% 1% 0% 100%
9.7 Java #7 23.49 635,272 889 23.45 0% 0% 2% 100%
11 C# Mono LLVM #3 160.96 738,832 725 160.71 0% 1% 2% 100%
16 Lua #2 8 min 1,035,484 446 8 min 0% 1% 1% 100%
17 PHP #3 164.95 1,137,716 483 164.80 1% 1% 1% 100%
22 Ruby JRuby #4 179.45 1,429,000 402 179.16 0% 2% 1% 100%
25 C++ g++ 12.58 1,624,236 796 12.54 1% 2% 0% 100%
30 Ruby JRuby #3 190.07 1,984,196 439 189.77 0% 1% 1% 100%
34 Ruby JRuby 288.09 2,244,844 412 287.65 0% 1% 1% 100%
34 Ruby JRuby #5 5 min 2,266,744 1123 5 min 0% 1% 1% 100%
Lisp SBCL #3 Bad Output
Perl #3 Failed
PHP #4 Partial
Scala #2 Failed