The Computer Language
Benchmarks Game

binary-trees

Always look at the source code.

Look at the slower simple sequential programs, and  look at the parallel programs written for multicore, and  look at the low-level programs written for SIMD.

× source secs mem gz busy cpu load
1.0 C++ g++ #7 1.04 154,824 1122 3.74 88% 100% 88% 86%
1.0 Rust #5 1.07 198,540 765 3.76 84% 100% 84% 83%
1.1 C++ g++ #5 1.19 199,952 885 4.29 88% 87% 87% 98%
1.2 Rust #2 1.21 200,476 721 4.33 87% 85% 87% 99%
1.2 Rust #4 1.25 167,028 756 4.57 88% 89% 100% 89%
1.3 Rust #3 1.35 169,928 754 4.90 89% 88% 87% 99%
1.4 C++ g++ #4 1.47 134,300 1270 3.82 49% 52% 99% 60%
1.7 C gcc #2 1.79 168,760 809 5.35 64% 64% 71% 100%
1.7 C++ g++ #9 1.80 135,712 809 5.06 57% 56% 69% 100%
1.8 C++ g++ #3 1.83 265,268 945 4.65 66% 88% 60% 40%
1.8 C++ g++ #6 1.83 265,728 844 4.65 66% 89% 59% 40%
1.9 Free Pascal #6 1.99 132,728 959 4.97 100% 58% 50% 42%
1.9 Free Pascal #7 2.01 132,732 1003 5.00 100% 58% 42% 49%
1.9 C gcc #3 2.02 133,960 836 5.21 49% 58% 100% 51%
2.0 Free Pascal #5 2.03 132,728 953 4.72 99% 49% 43% 42%
2.0 C++ g++ #8 2.08 265,732 820 5.16 46% 66% 88% 48%
2.3 C# .NET #6 2.35 807,172 753 7.82 83% 88% 84% 78%
2.3 Rust 2.37 132,892 751 8.42 87% 86% 94% 89%
2.3 Intel Fortran #2 2.38 133,752 1148 7.45 100% 70% 70% 73%
2.4 Java  #7 2.50 2,487,096 835 7.90 88% 75% 75% 79%
2.5 C++ g++ 2.63 1,947,564 754 9.01 83% 91% 85% 84%
2.6 F# .NET #5 2.73 719,880 635 9.33 80% 89% 87% 85%
3.3 Ada 2012 GNAT #4 3.40 202,376 2107 11.49 82% 89% 83% 83%
3.9 OCaml #2 4.04 152,736 751 11.19 39% 77% 68% 93%
4.0 Haskell GHC #7 4.11 519,284 811 15.16 92% 89% 91% 97%
4.0 F# .NET #8 4.15 687,996 769 14.28 83% 82% 89% 90%
4.0 Erlang HiPE #2 4.17 385,804 478 11.73 67% 84% 62% 69%
4.0 Java #4 4.20 2,178,184 840 5.03 37% 40% 28% 14%
4.1 Haskell GHC #8 4.31 472,748 799 15.35 89% 86% 93% 89%
4.5 Java #6 4.62 2,002,384 529 5.46 11% 91% 7% 8%
4.5 Java #3 4.65 2,013,384 540 5.51 10% 37% 53% 19%
4.5 Lisp SBCL #3 4.69 342,680 932 8.98 43% 62% 39% 48%
4.6 Java #2 4.82 1,952,424 552 5.65 15% 49% 37% 17%
4.9 Haskell GHC #6 5.10 454,868 592 18.38 88% 96% 88% 88%
4.9 C# .NET #3 5.12 1,764,596 676 16.57 77% 84% 83% 79%
5.7 C# .NET #7 5.89 869,852 719 21.44 95% 90% 89% 91%
5.8 F# .NET #7 6.06 1,469,616 516 16.18 63% 69% 62% 72%
6.5 Go #4 6.74 280,176 701 26.36 98% 98% 98% 97%
6.6 Racket #4 6.87 987,244 853 17.30 80% 53% 41% 77%
6.6 Haskell GHC #3 6.89 685,972 538 25.41 93% 88% 89% 99%
6.7 Go #2 6.97 245,104 745 27.33 99% 98% 97% 97%
6.9 Haskell GHC #5 7.15 697,220 561 26.42 92% 90% 91% 96%
7.1 Node js #6 7.34 1,262,364 744 22.41 75% 84% 72% 75%
7.3 Erlang HiPE 7.53 843,572 420 7.79 62% 37% 2% 3%
7.6 Chapel #3 7.86 298,696 488 24.18 100% 57% 77% 74%
8.1 C gcc #5 8.40 351,432 908 31.24 93% 93% 94% 93%
8.8 Node js 9.09 1,147,572 711 27.27 78% 74% 75% 73%
9.1 OCaml #5 9.42 154,504 461 9.55 1% 0% 1% 100%
9.3 Julia #4 9.67 604,312 372 29.97 75% 84% 72% 78%
9.4 Dart #4 9.73 694,000 1349 32.52 86% 88% 80% 80%
11 Lisp SBCL 11.55 374,944 589 11.87 2% 0% 1% 100%
12 Racket #3 12.54 594,864 473 12.73 0% 100% 1% 0%
12 Julia #5 12.57 605,308 390 39.74 83% 80% 78% 75%
12 Go #8 12.65 431,720 1017 43.57 86% 85% 87% 86%
13 Go #5 13.36 365,492 950 53.00 99% 99% 99% 99%
13 Go #3 13.86 369,180 799 54.06 97% 98% 98% 97%
13 Racket #2 13.88 596,044 416 14.06 0% 100% 1% 0%
14 Haskell GHC 14.35 711,076 494 27.23 30% 30% 30% 100%
14 Haskell GHC #2 14.48 454,280 491 27.38 30% 30% 30% 100%
14 Ada 2012 GNAT #3 14.63 527,860 1266 44.56 76% 74% 80% 75%
14 Dart 15.01 599,764 457 23.48 22% 75% 36% 23%
15 Dart #3 15.50 1,351,752 1206 56.83 91% 93% 89% 94%
15 Swift #3 16.00 699,652 862 50.97 100% 65% 76% 78%
15 Swift #2 16.01 699,700 816 51.87 100% 76% 68% 81%
16 VW Smalltalk #3 16.33 375,880 930 37.41 70% 46% 70% 43%
18 Swift #4 18.56 699,700 765 59.86 76% 68% 79% 100%
18 PHP #7 18.64 1,588,704 760 67.29 89% 90% 96% 86%
19 Swift 19.47 732,980 714 57.77 68% 62% 73% 95%
19 Julia #2 19.60 702,748 423 25.12 13% 96% 10% 10%
20 C gcc 21.00 263,616 654 21.09 0% 0% 0% 100%
21 PHP #4 21.40 1,558,524 779 64.07 56% 85% 86% 73%
21 C++ g++ #2 22.18 265,032 508 22.30 0% 0% 0% 100%
23 Ada 2012 GNAT 23.73 265,276 888 23.82 100% 0% 0% 0%
24 Racket 24.99 669,684 476 25.57 1% 1% 1% 100%
27 PHP #6 27.89 804,252 868 92.49 78% 78% 98% 78%
28 Go #7 28.64 256,164 525 53.81 44% 44% 48% 52%
28 Intel Fortran 28.71 525,624 773 32.74 4% 100% 5% 5%
28 Go 29.02 256,012 482 52.21 44% 45% 43% 48%
31 Node js #7 32.56 1,233,212 451 37.48 41% 17% 32% 25%
33 PHP #5 33.78 777,220 1040 88.44 75% 80% 47% 60%
34 Go #6 35.74 411,676 611 37.01 1% 2% 3% 97%
37 VW Smalltalk 38.24 375,680 711 38.56 0% 0% 100% 0%
48 Python 3 49.35 278,628 589 174.26 95% 86% 86% 86%
49 Lua #4 50.85 884,352 664 189.06 92% 97% 91% 92%
51 Perl #5 53.02 1,048,568 797 195.75 91% 88% 100% 90%
59 Ruby #4 60.99 875,584 364 63.56 96% 4% 3% 1%
61 PHP 63.06 747,960 451 67.59 2% 2% 3% 100%
61 Ruby #3 63.34 829,364 400 65.49 1% 100% 1% 1%
61 Ruby 63.59 875,716 376 66.48 1% 2% 1% 100%
62 PHP #2 64.14 747,932 423 68.01 4% 2% 97% 2%
62 Ruby #2 64.22 875,528 378 67.76 2% 2% 100% 1%
73 Python 3 #3 75.57 677,916 1238 222.16 66% 64% 64% 100%
77 Perl #4 79.85 2,519,676 761 291.24 98% 91% 90% 86%
82 Lua #3 85.09 884,384 684 170.53 89% 18% 43% 50%
110 Perl #3 114.27 2,200,624 648 6 min 97% 74% 90% 78%
140 Python 3 #2 144.87 274,312 338 146.30 0% 0% 0% 100%
144 Lua #2 149.02 938,152 412 150.15 0% 0% 100% 0%
243 Perl 252.06 599,456 395 254.71 100% 1% 0% 0%
299 Matz's Ruby #5 5 min 1,413,528 1096 16 min 72% 73% 71% 100%
543 Matz's Ruby #3 9 min 840,252 400 9 min 0% 4% 0% 96%
663 Matz's Ruby #4 11 min 1,558,880 364 11 min 4% 8% 0% 89%
729 Matz's Ruby 12 min 1,559,832 376 12 min 0% 38% 0% 63%
738 Matz's Ruby #2 12 min 1,559,532 378 12 min 0% 0% 0% 100%
PHP #3 Failed
Ruby #5 Failed
Swift #9 Make Error