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.51 25,828 1791 6.03 100% 100% 100% 100%
1.1 C gcc #6 1.64 26,504 1135 6.54 100% 100% 99% 100%
1.1 Rust #6 1.70 30,492 1332 6.70 98% 98% 98% 100%
1.2 C++ g++ #4 1.78 34,720 3095 6.98 97% 98% 99% 98%
1.2 C++ g++ #6 1.82 29,408 1002 7.17 98% 98% 100% 98%
1.3 Rust #5 1.97 31,972 719 7.79 98% 100% 98% 98%
1.3 Rust #3 2.02 11,980 1007 8.05 100% 100% 100% 100%
2.1 Swift #3 3.20 39,384 1138 12.70 100% 99% 99% 99%
2.9 Julia #2 4.36 233,396 713 10.72 77% 77% 36% 57%
3.2 Haskell GHC #3 4.87 36,328 1975 19.39 99% 100% 100% 99%
3.3 C gcc #8 4.98 29,688 782 19.43 97% 97% 100% 97%
3.4 C gcc #4 5.15 27,148 799 20.58 100% 100% 100% 100%
3.4 Rust 5.16 38,964 868 20.42 98% 100% 99% 99%
3.5 C++ g++ #9 5.32 34,528 726 20.49 95% 95% 95% 100%
3.6 Go #4 5.47 31,088 905 21.77 100% 99% 99% 99%
3.6 Go #3 5.48 30,844 894 21.77 99% 99% 100% 99%
3.7 C# aot #9 5.53 65,164 816 21.75 99% 98% 98% 99%
3.7 Ada 2012 GNAT #3 5.59 35,968 1819 22.21 99% 99% 99% 99%
3.7 C# .NET Core #9 5.60 65,296 816 21.78 96% 97% 99% 96%
3.8 C gcc #9 5.80 32,908 694 22.39 95% 95% 96% 100%
3.9 Chapel #2 5.82 36,220 620 23.04 99% 99% 99% 99%
3.9 C# aot #8 5.84 65,792 794 22.96 98% 99% 98% 98%
3.9 C# .NET Core #8 5.91 65,216 794 23.03 97% 97% 97% 99%
4.0 C gcc #7 6.08 33,496 994 24.25 100% 100% 100% 100%
4.0 C++ g++ #7 6.08 34,728 1017 24.25 100% 100% 100% 100%
4.1 C gcc 6.16 25,924 822 24.60 100% 100% 100% 100%
4.2 C# aot #7 6.26 65,640 923 24.66 98% 98% 100% 98%
4.2 C# .NET Core #7 6.34 64,864 923 24.69 97% 97% 97% 99%
4.2 C gcc #3 6.36 32,512 763 25.33 100% 100% 100% 100%
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 Node js #3 6.72 82,708 1122 26.53 99% 99% 100% 99%
4.5 C# aot #4 6.82 65,592 672 26.86 99% 98% 98% 99%
4.5 C# aot #6 6.83 65,908 755 26.92 98% 98% 100% 98%
4.5 Java  #2 6.83 79,108 796 26.86 97% 99% 99% 99%
4.5 C# aot #5 6.86 60,564 839 27.00 98% 98% 100% 98%
4.6 C# .NET Core #4 6.88 64,864 672 26.92 97% 98% 99% 97%
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%
5.3 F# .NET Core #4 7.94 65,516 886 31.12 98% 99% 98% 97%
5.3 C++ g++ #8 8.03 34,508 742 21.86 100% 100% 37% 36%
5.4 Java #6 8.16 79,076 802 32.16 99% 99% 98% 98%
5.6 Free Pascal #8 8.52 29,120 974 34.00 100% 100% 100% 100%
5.8 Java #4 8.69 68,124 660 27.08 80% 84% 50% 98%
5.8 Java OpenJ9 #6 8.82 119,608 802 34.48 97% 98% 99% 97%
5.9 Lisp SBCL 8.90 50,424 2473 32.44 87% 83% 100% 95%
5.9 Java OpenJ9 #2 8.92 116,084 796 34.75 97% 97% 96% 98%
6.0 Java OpenJ9 #4 9.02 95,072 660 32.92 95% 93% 94% 83%
6.6 Free Pascal #7 9.88 36,628 950 39.44 100% 100% 100% 100%
7.1 Chapel 10.76 36,132 455 42.78 100% 99% 99% 99%
7.6 C# aot #3 11.40 66,392 701 45.06 99% 99% 99% 99%
7.6 C# .NET Core #3 11.45 66,056 701 45.10 99% 98% 98% 99%
7.6 Java #3 11.50 80,640 903 45.54 99% 99% 99% 100%
7.7 F# .NET Core #2 11.55 39,660 1043 45.48 98% 98% 98% 100%
7.7 C# aot 11.61 66,568 798 45.99 99% 99% 99% 100%
7.7 Haskell GHC #2 11.63 39,948 782 46.42 100% 100% 100% 100%
7.8 C# .NET Core 11.72 65,824 798 46.20 98% 99% 99% 98%
8.3 Go #2 12.47 33,064 837 49.78 100% 100% 100% 100%
8.3 F# .NET Core #3 12.54 66,588 800 49.45 98% 100% 98% 98%
8.5 Go #6 12.80 32,720 700 51.11 100% 100% 100% 100%
8.8 Java OpenJ9 #3 13.34 105,936 903 52.54 98% 99% 99% 98%
9.2 OCaml 13.84 5,004 717 55.24 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.06 50,072 894 48.80 100% 35% 97% 38%
13 Racket #4 19.68 128,248 801 74.94 95% 96% 95% 95%
14 Dart exe #2 20.58 74,644 911 55.86 45% 90% 37% 99%
14 Go 20.88 34,272 823 42.29 35% 0% 100% 67%
14 Dart snapshot #2 20.90 167,920 911 56.54 98% 53% 83% 37%
14 Dart aot #2 21.32 82,660 911 55.95 94% 56% 36% 77%
15 Dart #2 22.45 188,220 911 57.50 90% 36% 93% 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.42 33,664 590 23.69 0% 0% 1% 100%
20 C++ g++ #2 29.58 34,640 692 29.85 0% 0% 100% 1%
28 Java OpenJ9 42.97 59,284 665 43.94 0% 100% 1% 1%
29 Java 43.87 35,732 665 44.31 100% 1% 0% 0%
29 Julia 44.17 191,096 373 44.86 100% 1% 1% 0%
31 C gcc #2 47.40 784 400 47.76 40% 60% 0% 0%
33 Swift 49.57 6,736 394 50.61 0% 0% 1% 100%
34 Ada 2012 GNAT #2 51.57 2,032 577 51.97 77% 0% 0% 23%
36 C++ g++ #3 54.03 1,796 414 54.64 1% 0% 0% 100%
37 OCaml #6 55.11 2,812 444 55.71 0% 23% 78% 0%
37 Free Pascal #3 56.11 8 526 56.73 0% 100% 1% 0%
37 Fortran Intel #5 56.28 33,416 520 56.79 39% 0% 0% 62%
49 Racket #3 73.51 38,296 802 75.25 29% 1% 1% 72%
57 Racket #2 86.33 38,088 585 87.22 0% 100% 0% 1%
70 PHP #3 105.89 125,020 875 7 min 100% 100% 100% 100%
73 Erlang HiPE #3 110.22 52,080 792 7 min 100% 100% 100% 100%
73 Erlang HiPE #2 110.64 738,676 613 7 min 99% 100% 99% 99%
76 Erlang HiPE #4 114.00 48,104 806 7 min 100% 100% 100% 100%
78 Erlang HiPE 118.29 1,635,892 534 7 min 97% 98% 97% 98%
78 Racket 118.33 36,816 517 120.98 5% 0% 1% 97%
111 VW Smalltalk #2 167.01 176,972 929 9 min 89% 96% 75% 88%
114 C# aot #2 171.43 44,988 484 174.56 41% 18% 39% 4%
114 C# .NET Core #2 171.98 44,420 484 175.18 1% 49% 50% 1%
170 Lua #6 256.77 22,712 623 14 min 99% 86% 87% 78%
172 Python 3 #7 259.50 48,192 688 17 min 100% 100% 100% 100%
178 Racket CS #4 268.02 120,188 801 16 min 92% 92% 92% 92%
195 Racket CS #3 294.16 84,400 802 297.58 67% 1% 0% 33%
208 JRuby #7 5 min 802,236 973 20 min 99% 98% 98% 98%
223 JRuby #4 5 min 835,316 846 22 min 99% 98% 98% 98%
237 Racket CS #2 5 min 82,472 585 6 min 67% 7% 0% 27%
253 Racket CS 6 min 81,548 517 6 min 40% 1% 0% 60%
280 PHP 7 min 7,956 449 7 min 8% 39% 56% 1%
282 Python 3 #2 7 min 92,956 783 28 min 99% 99% 99% 100%
292 Python 3 #5 7 min 47,948 458 29 min 100% 100% 100% 100%
295 Ruby #2 7 min 59,864 954 29 min 100% 100% 100% 100%
298 Ruby #5 7 min 66,932 1044 29 min 100% 100% 100% 100%
388 VW Smalltalk 9 min 54,816 603 10 min 48% 6% 5% 45%
415 Pharo Smalltalk #2 10 min 103,616 562 10 min 11% 49% 41% 1%
421 Pharo Smalltalk 10 min 103,228 570 10 min 31% 1% 1% 69%
456 Perl 11 min 44,096 586 45 min 100% 100% 100% 100%
473 Lua 11 min 2,848 359 12 min 0% 0% 52% 49%
476 Lua #3 11 min 3,016 358 12 min 100% 1% 0% 0%
562 Ruby #4 14 min 78,288 846 14 min 24% 28% 28% 26%
586 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 31 min 746,616 307 31 min 26% 24% 28% 23%
  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 Failed
Fortran Intel #7 Failed
Fortran Intel Bad Output
Fortran Intel #6 Failed
Fortran Intel #4 Failed
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
JRuby #5 Bad Output
Rust #4 Make Error
TypeScript Failed