The Computer Language
Benchmarks Game

mandelbrot

We accept something intermediate between chaos and rigidity — enough flex & slop & play to allow for Haskell programs that are not just mechanically translated from Fortran; enough similarity in the basic workloads & tested results.

Programming language advocates and curious programmers have contributed new programs and introduced newer techniques. 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. Always look at the source code.

× source secs mem gz busy cpu load
1.0 C++ g++ 1.50 26,324 1791 5.97 100% 99% 99% 99%
1.1 C gcc #6 1.65 26,204 1135 6.56 99% 100% 99% 99%
1.2 C++ g++ #6 1.82 29,256 1002 7.14 98% 98% 98% 100%
1.3 Rust #5 1.98 32,092 719 7.83 98% 100% 98% 98%
1.5 Rust #6 2.19 31,948 1332 8.68 99% 99% 99% 100%
2.1 Swift #3 3.14 39,140 1138 12.45 100% 99% 99% 99%
2.8 Rust 4.22 39,048 868 16.57 99% 98% 99% 97%
2.9 Julia #2 4.33 197,672 713 13.70 62% 99% 77% 78%
3.3 C gcc #8 4.95 32,584 782 19.24 96% 100% 96% 96%
3.5 C++ g++ #9 5.32 34,532 726 20.49 95% 95% 99% 95%
3.6 Chapel #2 5.42 36,060 620 21.43 100% 99% 99% 99%
3.6 C gcc #4 5.46 28,440 799 21.83 100% 100% 100% 100%
3.7 Go #3 5.48 30,820 894 21.79 100% 99% 99% 99%
3.7 Go #4 5.49 30,540 905 21.86 99% 100% 99% 99%
3.7 C# .NET Core #9 5.54 66,320 816 21.63 99% 97% 97% 98%
3.7 Ada 2012 GNAT #3 5.59 35,952 1819 22.19 99% 100% 99% 99%
3.7 C gcc #3 5.61 32,480 763 22.34 100% 99% 99% 99%
3.9 C gcc #9 5.82 32,836 694 22.48 95% 95% 100% 95%
3.9 C# .NET Core #8 5.90 66,652 794 23.09 99% 97% 97% 98%
4.0 Java  #2 5.98 79,184 796 23.43 98% 98% 97% 99%
4.1 C gcc 6.08 27,220 822 24.32 100% 100% 100% 100%
4.1 C++ g++ #7 6.08 34,696 1017 24.25 100% 100% 100% 100%
4.1 C gcc #7 6.08 33,084 994 24.25 100% 100% 100% 100%
4.4 C# .NET Core #7 6.57 66,192 923 25.75 97% 100% 98% 97%
4.5 Fortran Intel #6 6.70 61,836 661 23.22 82% 82% 82% 100%
4.5 F# .NET Core #5 6.70 67,412 897 26.27 98% 97% 97% 99%
4.5 F# .NET Core 6.72 67,092 877 26.35 97% 100% 97% 97%
4.5 Node js #3 6.78 82,684 1122 26.65 98% 99% 98% 98%
4.6 C# .NET Core #4 6.86 66,472 672 26.90 99% 97% 98% 98%
4.6 C# .NET Core #6 6.86 66,416 755 26.94 99% 98% 97% 99%
4.8 C++ g++ #4 7.14 33,112 1035 28.48 100% 100% 100% 100%
4.9 Java #6 7.35 78,828 802 28.70 97% 98% 97% 98%
4.9 C# .NET Core #5 7.40 64,796 839 29.02 97% 100% 98% 97%
5.2 Substrate VM #6 7.80 35,380 802 31.04 99% 99% 99% 100%
5.2 Substrate VM #2 7.80 35,452 796 31.04 100% 99% 100% 99%
5.4 C++ g++ #8 8.03 34,536 742 21.88 97% 100% 39% 37%
5.4 Substrate VM #4 8.13 35,768 660 30.31 89% 100% 97% 86%
5.6 F# .NET Core #4 8.35 67,084 886 32.83 98% 99% 98% 99%
5.9 Lisp SBCL 8.83 49,916 2473 32.43 85% 99% 84% 100%
5.9 Java #4 8.89 67,608 660 27.10 98% 50% 81% 76%
6.6 Free Pascal #7 9.88 36,628 950 39.44 100% 100% 100% 100%
7.0 Go 10.51 34,092 823 42.01 100% 100% 100% 100%
7.5 Java #3 11.28 80,660 903 44.67 99% 99% 99% 100%
7.6 C# .NET Core #3 11.45 68,300 701 45.15 98% 98% 98% 100%
7.7 Haskell GHC #2 11.60 37,756 782 46.30 100% 100% 100% 100%
7.8 C# .NET Core 11.69 68,160 798 46.08 99% 98% 98% 100%
8.3 Chapel 12.39 36,104 455 49.32 100% 99% 99% 99%
8.3 F# .NET Core #3 12.48 69,164 800 49.23 100% 98% 98% 98%
8.5 Go #6 12.78 31,440 700 51.04 100% 100% 100% 100%
8.7 Substrate VM #3 13.11 36,604 903 52.28 100% 100% 100% 100%
9.2 F# .NET Core #2 13.75 40,968 1043 54.32 98% 100% 98% 98%
9.2 OCaml 13.75 4,916 717 54.88 100% 100% 100% 100%
9.4 Free Pascal #6 14.13 35,832 802 56.48 100% 100% 100% 100%
9.6 TypeScript #2 14.39 92,784 1034 51.37 81% 79% 98% 98%
11 Node js 16.41 578,440 748 59.08 83% 85% 96% 96%
12 Lisp SBCL #3 18.09 49,832 894 49.01 35% 36% 100% 100%
12 Go #2 18.52 33,080 837 56.18 68% 67% 100% 68%
13 Fortran Intel #4 18.96 64,200 618 49.09 33% 92% 92% 42%
13 Racket #4 19.89 135,252 801 75.02 94% 96% 94% 93%
14 Dart aot #2 20.45 85,780 911 56.14 37% 38% 100% 100%
14 Dart snapshot #2 20.68 144,164 911 56.48 99% 99% 37% 38%
14 Dart #2 21.04 176,852 911 57.43 99% 99% 37% 38%
15 Free Pascal 22.69 33,128 846 61.42 96% 41% 96% 38%
15 Free Pascal #2 22.69 33,128 846 61.43 37% 41% 96% 96%
16 C++ g++ #5 23.70 33,696 590 23.85 0% 0% 0% 100%
20 C++ g++ #2 29.65 34,620 692 30.02 1% 0% 0% 100%
29 Java 43.86 35,832 665 44.39 0% 1% 100% 0%
29 Julia 44.18 184,056 373 44.99 1% 0% 0% 100%
32 C gcc #2 47.40 844 400 47.95 1% 100% 0% 0%
33 Swift 49.55 6,916 394 50.07 100% 1% 0% 0%
34 Truffle Ruby #2 50.65 909,428 954 192.79 94% 96% 95% 95%
35 Substrate VM 52.47 4,752 665 52.97 0% 100% 1% 0%
35 Ada 2012 GNAT #2 52.67 1,896 577 53.30 100% 0% 0% 0%
37 OCaml #6 55.11 2,832 444 55.66 0% 100% 1% 0%
37 Free Pascal #3 56.11 8 526 56.73 0% 100% 1% 0%
38 Fortran Intel #5 56.96 33,416 520 57.61 100% 0% 1% 0%
49 Racket #3 73.91 49,136 802 74.91 1% 0% 0% 100%
56 C++ g++ #3 83.27 1,776 414 84.04 100% 0% 0% 1%
56 Truffle Ruby #3 84.07 779,516 307 106.93 9% 98% 10% 11%
58 Racket #2 86.55 48,384 585 87.53 93% 0% 7% 1%
74 Erlang HiPE #4 110.56 50,308 806 7 min 100% 100% 100% 100%
78 PHP #3 117.20 127,020 875 7 min 100% 100% 100% 100%
79 Racket 118.25 44,204 517 120.45 1% 100% 0% 1%
86 Erlang HiPE #3 129.33 46,608 792 8 min 100% 100% 100% 100%
89 Erlang HiPE 133.33 1,648,700 534 8 min 98% 97% 98% 98%
89 Erlang HiPE #2 133.99 779,364 613 8 min 99% 99% 99% 99%
111 VW Smalltalk #2 166.11 176,736 929 9 min 88% 82% 90% 88%
116 C# .NET Core #2 173.35 66,892 484 177.17 42% 6% 3% 50%
171 Lua #6 256.77 22,712 623 14 min 99% 86% 87% 78%
180 Racket CS #4 270.75 135,784 801 16 min 92% 92% 92% 92%
189 Racket CS #3 283.71 79,232 802 288.10 0% 1% 1% 100%
190 Python 3 #7 284.36 52,412 688 18 min 100% 100% 100% 100%
212 JRuby #7 5 min 793,808 973 20 min 97% 97% 97% 97%
227 JRuby #4 5 min 832,632 846 22 min 98% 98% 98% 98%
238 Racket CS #2 5 min 81,860 585 6 min 5% 0% 1% 96%
244 Racket CS 6 min 82,352 517 6 min 0% 0% 100% 0%
291 Python 3 #2 7 min 14,212 783 27 min 94% 94% 100% 94%
296 Ruby #2 7 min 59,864 954 29 min 100% 100% 100% 100%
296 Python 3 #5 7 min 51,352 458 29 min 100% 100% 100% 100%
299 Ruby #5 7 min 66,932 1044 29 min 100% 100% 100% 100%
318 PHP 7 min 7,640 449 8 min 57% 43% 1% 0%
390 VW Smalltalk 9 min 54,556 603 9 min 1% 1% 100% 1%
410 Pharo Smalltalk #2 10 min 80,072 562 10 min 7% 12% 83% 0%
423 Pharo Smalltalk 10 min 79,912 570 10 min 14% 1% 9% 79%
442 Perl 11 min 43,280 586 44 min 100% 100% 100% 100%
451 JRuby #5 11 min 1,894,488 1023 42 min 95% 95% 95% 95%
476 Lua 11 min 2,848 359 12 min 0% 0% 52% 49%
478 Lua #3 11 min 3,016 358 12 min 100% 1% 0% 0%
565 Ruby #4 14 min 78,288 846 14 min 24% 28% 28% 26%
590 Lua #2 14 min 1,336 367 14 min 0% 0% 53% 48%
  Ruby #3 27 min 15,772 307 28 min 2% 54% 18% 29%
  JRuby #3 30 min 749,344 307 31 min 66% 1% 1% 34%
  Ruby #6 33 min 79,012 918 2h 15 min 100% 100% 100% 100%
  Ruby #7 34 min 85,772 973 2h 15 min 100% 100% 100% 99%
  Matz's Ruby #6 1h 23 min 783,136 918 5h 28 min 99% 98% 98% 98%
  Matz's Ruby #3 3h 54 min 3,880 307 3h 57 min 43% 39% 10% 10%
Fortran Intel #3 Bad Output
Fortran Intel #7 Timed Out
Fortran Intel Bad Output
Fortran Intel #2 Bad Output
Matz's Ruby #7 Failed
Matz's Ruby #2 Failed
Matz's Ruby #5 Failed
Matz's Ruby #4 Timed Out
Truffle Ruby #5 Bad Output
Truffle Ruby #7 Failed
Truffle Ruby #6 Failed
Truffle Ruby #4 Failed
Rust #4 Make Error
Rust #3 Make Error
TypeScript Failed