The Computer Language
22.01 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 manually vectorized SIMD programs. Choose which programs you want to compare.

× source secs mem gz busy cpu load
1.0 C++ g++ #7 0.94 176,440 890 3.33 85% 87% 83% 100%
1.2 Rust #5 1.11 198,404 765 3.93 86% 98% 86% 85%
1.2 C++ g++ #5 1.14 200,052 885 4.15 98% 89% 89% 88%
1.3 Rust #2 1.18 200,204 721 4.25 88% 87% 99% 87%
1.4 Rust #4 1.27 163,268 756 4.65 88% 89% 99% 90%
1.4 Rust #3 1.32 191,640 754 4.87 99% 90% 89% 90%
1.7 C++ g++ #9 1.57 130,732 809 4.36 55% 54% 100% 69%
1.7 C gcc #2 1.58 168,780 809 4.58 100% 62% 67% 62%
1.9 C gcc #3 1.79 131,624 836 4.71 62% 51% 100% 49%
1.9 C++ g++ #3 1.82 265,340 945 4.73 56% 87% 65% 51%
2.0 C++ g++ #6 1.84 265,740 844 4.70 48% 68% 51% 89%
2.2 Free Pascal #7 2.04 132,476 968 5.03 100% 41% 57% 50%
2.2 Free Pascal #6 2.06 132,484 936 5.08 41% 59% 47% 100%
2.2 Free Pascal #5 2.06 132,332 923 5.32 41% 50% 100% 68%
2.2 C++ g++ #8 2.10 265,740 820 5.13 88% 44% 48% 64%
2.3 Classic Fortran #2 2.13 136,468 1148 6.80 71% 80% 78% 89%
2.4 Rust 2.21 132,896 751 7.85 85% 89% 88% 94%
2.7 Java  #7 2.51 2,479,012 835 7.94 74% 92% 78% 71%
2.8 C++ g++ 2.63 2,012,452 754 9.14 85% 86% 83% 94%
3.3 Ada 2012 GNAT #4 3.08 202,468 2107 9.65 94% 71% 69% 79%
4.5 OCaml #2 4.22 135,328 751 11.52 52% 40% 83% 99%
4.7 Haskell GHC #7 4.39 505,952 811 10.86 55% 63% 64% 66%
4.9 Java #6 4.59 2,100,436 529 5.45 12% 24% 75% 8%
5.0 Haskell GHC #8 4.70 435,080 799 10.89 52% 49% 78% 53%
5.1 Java #3 4.75 2,121,816 540 5.57 7% 6% 12% 92%
5.1 Java #4 4.75 2,082,992 840 5.59 7% 31% 70% 9%
5.1 Java #2 4.79 2,057,464 552 5.64 97% 5% 7% 8%
5.2 C# .NET #2 4.90 1,651,992 705 15.90 77% 79% 79% 89%
5.2 C# .NET #7 4.92 1,713,900 694 16.18 88% 79% 80% 82%
5.3 Racket #4 4.96 531,972 853 9.69 66% 46% 41% 42%
5.3 C# .NET #3 4.98 2,053,224 676 16.04 80% 77% 87% 78%
5.3 C# .NET 4.98 2,006,320 657 16.34 77% 88% 79% 84%
5.5 Erlang #2 5.12 425,140 478 16.17 78% 72% 79% 87%
5.8 Lisp SBCL #3 5.44 332,752 932 10.64 47% 44% 44% 61%
6.0 Haskell GHC #6 5.60 448,376 592 11.50 41% 59% 54% 52%
6.5 F# .NET #7 6.14 1,398,820 516 16.30 64% 71% 64% 67%
6.6 Racket #3 6.19 317,560 473 6.34 0% 1% 1% 100%
7.6 Node js #6 7.13 1,231,192 744 20.86 83% 67% 69% 74%
7.8 Julia #3 7.28 494,392 634 23.51 74% 100% 69% 80%
7.8 Haskell GHC #5 7.33 736,472 561 15.60 47% 45% 83% 38%
8.6 Haskell GHC #3 8.07 676,480 538 17.79 44% 44% 76% 57%
8.6 Chapel #3 8.10 299,436 488 24.65 99% 57% 75% 73%
9.0 C gcc #5 8.46 351,376 908 31.33 98% 94% 93% 85%
9.7 Racket #2 9.11 319,000 416 9.28 1% 1% 1% 100%
10 OCaml #5 9.84 166,812 461 9.92 0% 0% 100% 0%
12 Lisp SBCL 11.43 355,720 589 11.76 1% 100% 1% 1%
13 Ada 2012 GNAT #3 11.77 528,008 1266 33.37 69% 72% 74% 70%
13 Haskell GHC #2 11.89 441,348 491 13.69 41% 6% 35% 33%
13 Node js 11.92 1,058,368 711 35.38 73% 74% 74% 76%
13 Erlang 11.96 447,028 420 12.44 13% 3% 87% 2%
13 Go #2 12.48 659,828 666 49.71 100% 100% 100% 100%
14 Go #5 12.92 336,828 950 49.42 95% 96% 97% 95%
14 Go #3 12.96 373,872 799 50.63 97% 99% 97% 98%
14 Dart 13.00 406,864 482 16.94 16% 92% 10% 12%
14 Dart #4 13.03 506,164 1387 28.84 56% 61% 53% 52%
14 Dart #7 13.35 487,616 863 29.90 55% 55% 55% 58%
14 Haskell GHC 13.51 672,308 494 15.73 14% 74% 18% 10%
15 Dart #5 14.24 490,460 1016 33.54 61% 59% 56% 61%
16 Racket 15.31 439,876 476 15.53 0% 0% 100% 1%
18 Julia #4 16.50 499,672 372 47.23 85% 69% 66% 66%
18 Swift #2 16.52 700,384 816 52.80 75% 100% 77% 67%
18 Swift #3 16.57 700,320 862 53.02 79% 96% 70% 75%
18 VW Smalltalk #3 16.60 375,868 930 38.80 58% 44% 54% 78%
18 Swift #5 17.08 733,504 806 51.00 73% 95% 62% 69%
19 PHP #7 17.82 1,589,760 760 63.91 89% 89% 96% 84%
19 Julia #5 18.26 672,864 390 53.39 68% 78% 68% 78%
20 Julia #2 18.95 427,824 423 37.26 33% 39% 33% 92%
20 Swift #4 19.07 700,416 765 61.25 78% 75% 100% 68%
21 Dart #3 19.65 924,888 1212 45.84 60% 58% 57% 58%
21 Swift 19.85 733,288 714 59.15 71% 63% 68% 95%
23 PHP #4 21.19 1,559,592 779 63.95 57% 97% 75% 73%
24 Ada 2012 GNAT 22.22 265,568 888 22.43 100% 0% 1% 0%
24 C gcc 22.30 263,672 654 22.60 100% 1% 0% 0%
24 C++ g++ #2 22.44 265,224 508 22.92 0% 100% 1% 1%
28 Ruby #5 26.71 680,796 1008 76.04 70% 90% 60% 64%
30 Go 27.76 247,624 482 48.71 42% 40% 47% 46%
30 Go #7 27.79 252,428 525 51.00 45% 48% 45% 46%
30 PHP #6 27.86 797,568 868 90.94 88% 75% 87% 76%
30 Go #6 28.14 410,344 611 29.46 97% 2% 3% 2%
35 Classic Fortran 33.15 525,908 773 33.70 0% 1% 100% 0%
36 PHP #5 33.56 793,360 1040 86.76 78% 57% 62% 62%
37 Node js #7 34.88 1,081,768 451 40.99 19% 25% 42% 31%
41 VW Smalltalk 38.07 374,996 711 38.59 0% 100% 0% 1%
48 Python 3 #5 44.70 273,136 660 161.37 83% 90% 91% 97%
48 Python 3 #4 45.34 456,492 472 167.71 90% 90% 90% 99%
51 Python 3 48.13 442,180 589 170.39 86% 86% 94% 87%
53 Lua #4 49.69 927,460 664 184.53 97% 91% 93% 91%
55 PHP #3 51.50 1,562,576 428 52.19 100% 1% 0% 1%
58 Perl #5 54.12 1,048,528 797 200.52 90% 90% 100% 90%
66 PHP 61.85 749,000 451 62.52 21% 0% 0% 80%
66 PHP #2 62.29 748,992 423 62.96 100% 0% 0% 1%
73 Ruby #4 69.00 676,944 364 71.31 1% 1% 100% 1%
76 Python 3 #3 71.59 669,920 1238 207.71 65% 64% 100% 62%
77 Ruby #3 72.70 751,800 400 73.81 0% 100% 0% 1%
77 Ruby 72.71 676,856 376 73.15 0% 0% 0% 100%
78 Ruby #2 72.96 676,908 378 73.57 0% 0% 0% 100%
80 Perl #4 75.26 2,519,604 761 273.17 87% 91% 97% 87%
90 Lua #3 84.57 927,592 684 170.81 50% 57% 38% 57%
113 Perl #3 105.71 2,203,444 648 5 min 92% 75% 100% 72%
147 Python 3 #2 138.17 270,860 338 140.25 1% 1% 100% 0%
154 Lua #2 144.20 963,508 412 145.62 0% 100% 0% 0%
273 Perl 256.06 599,540 395 259.61 0% 1% 100% 0%
337 Matz's Ruby #5 5 min 1,413,456 1008 16 min 73% 72% 75% 95%
605 Matz's Ruby #3 9 min 840,244 400 9 min 0% 3% 0% 97%
733 Matz's Ruby #4 11 min 1,560,732 364 12 min 15% 62% 2% 27%
  Matz's Ruby 12 min 1,559,732 376 12 min 0% 100% 0% 0%
  Matz's Ruby #2 12 min 1,558,884 378 12 min 49% 0% 51% 0%
C++ g++ #4 Make Error
Swift #9 Make Error