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.1 Rust #6 1.70 30,424 1332 6.69 98% 98% 98% 99%
1.2 C++ g++ #6 1.82 29,256 1002 7.14 98% 98% 98% 100%
1.3 Rust #5 1.95 32,376 719 7.69 98% 100% 98% 98%
1.3 Rust #3 2.01 12,232 1007 7.98 100% 100% 99% 99%
2.1 Swift #3 3.19 39,268 1138 12.66 99% 99% 99% 100%
3.0 Julia #2 4.50 224,692 713 12.64 74% 74% 75% 58%
3.3 C gcc #8 4.95 32,584 782 19.24 96% 100% 96% 96%
3.4 Rust 5.17 39,156 868 20.44 99% 99% 98% 99%
3.5 C++ g++ #9 5.32 34,532 726 20.49 95% 95% 99% 95%
3.6 Chapel #2 5.42 36,112 620 21.47 99% 99% 99% 99%
3.6 C gcc #4 5.46 28,440 799 21.83 100% 100% 100% 100%
3.6 Go #4 5.47 31,104 905 21.78 99% 100% 99% 99%
3.7 Go #3 5.48 31,340 894 21.81 100% 99% 99% 99%
3.7 Ada 2012 GNAT #3 5.59 35,952 1819 22.19 99% 100% 99% 99%
3.7 C# .NET Core #9 5.60 65,296 816 21.78 96% 97% 99% 96%
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.91 65,216 794 23.03 97% 97% 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.2 C# .NET Core #7 6.34 64,864 923 24.69 97% 97% 97% 99%
4.3 F# .NET Core #5 6.47 65,488 897 25.26 97% 100% 97% 97%
4.3 F# .NET Core 6.50 65,324 877 25.36 97% 97% 99% 97%
4.5 Fortran Intel #6 6.69 61,884 661 23.24 83% 82% 82% 100%
4.5 Node js #3 6.72 82,708 1122 26.53 99% 99% 100% 99%
4.6 C# .NET Core #4 6.88 64,864 672 26.92 97% 98% 99% 97%
4.6 Java  #2 6.90 78,956 796 27.14 99% 98% 98% 98%
4.6 C# .NET Core #6 6.91 65,004 755 26.98 97% 98% 99% 97%
4.6 C# .NET Core #5 6.93 65,080 839 27.05 100% 97% 97% 97%
4.8 C++ g++ #4 7.14 33,112 1035 28.48 100% 100% 100% 100%
5.3 F# .NET Core #4 7.94 65,516 886 31.12 98% 99% 98% 97%
5.4 C++ g++ #8 8.03 34,536 742 21.88 97% 100% 39% 37%
5.4 Java #6 8.16 79,084 802 32.16 99% 98% 99% 98%
5.7 Free Pascal #8 8.52 29,120 974 34.00 100% 100% 100% 100%
5.9 Lisp SBCL 8.83 49,916 2473 32.43 85% 99% 84% 100%
5.9 Java #4 8.84 67,888 660 27.03 75% 80% 52% 98%
5.9 Java OpenJ9 #6 8.90 110,760 802 34.82 99% 98% 96% 98%
6.0 Java OpenJ9 #2 8.96 114,560 796 35.02 97% 99% 98% 97%
6.6 Free Pascal #7 9.88 36,628 950 39.44 100% 100% 100% 100%
7.0 Java OpenJ9 #4 10.43 92,136 660 32.52 83% 97% 81% 50%
7.0 Go 10.46 34,020 823 41.80 100% 100% 100% 100%
7.6 C# .NET Core #3 11.45 66,056 701 45.10 99% 98% 98% 99%
7.7 Java #3 11.55 80,964 903 45.53 98% 99% 99% 98%
7.7 F# .NET Core #2 11.55 39,660 1043 45.48 98% 98% 98% 100%
7.8 Haskell GHC #2 11.65 39,512 782 46.54 100% 100% 100% 100%
7.8 C# .NET Core 11.72 65,824 798 46.20 98% 99% 99% 98%
8.3 Chapel 12.40 36,000 455 49.35 100% 100% 99% 99%
8.4 F# .NET Core #3 12.54 66,588 800 49.45 98% 100% 98% 98%
8.4 Go #2 12.55 33,308 837 49.82 100% 100% 99% 99%
8.5 Go #6 12.80 32,728 700 51.14 100% 100% 100% 100%
8.8 Java OpenJ9 #3 13.23 103,996 903 52.10 98% 99% 99% 99%
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.5 TypeScript #2 14.27 92,552 1034 50.80 79% 99% 79% 99%
11 Node js 16.33 595,600 748 58.90 86% 83% 97% 95%
12 Lisp SBCL #3 18.09 49,832 894 49.01 35% 36% 100% 100%
13 Fortran Intel #4 18.99 67,424 618 49.18 92% 100% 33% 34%
13 Racket #4 19.89 135,252 801 75.02 94% 96% 94% 93%
14 Dart aot #2 20.65 91,300 911 56.33 99% 99% 37% 38%
14 Dart snapshot #2 20.84 147,468 911 56.50 37% 37% 98% 99%
14 Dart #2 21.56 177,448 911 57.41 37% 96% 37% 96%
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 OpenJ9 42.98 63,860 665 43.87 100% 0% 1% 1%
29 Java 43.87 35,772 665 44.38 0% 1% 100% 0%
29 Julia 44.21 190,724 373 44.96 1% 100% 0% 0%
32 C gcc #2 47.40 844 400 47.95 1% 100% 0% 0%
33 Swift 49.54 6,812 394 50.21 1% 0% 0% 100%
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 Fortran Intel #5 55.97 33,416 520 56.51 100% 0% 0% 1%
37 Free Pascal #3 56.11 8 526 56.73 0% 100% 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%
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%
115 C# .NET Core #2 171.98 44,420 484 175.18 1% 49% 50% 1%
171 Lua #6 256.77 22,712 623 14 min 99% 86% 87% 78%
172 Python 3 #7 258.69 48,416 688 17 min 100% 100% 100% 100%
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%
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%
288 Python 3 #5 7 min 48,488 458 28 min 100% 100% 100% 100%
293 Python 3 #2 7 min 113,052 783 27 min 97% 97% 94% 94%
296 Ruby #2 7 min 59,864 954 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
Rust #4 Make Error
TypeScript Failed