The Computer Language
24.09 Benchmarks Game

mandelbrot

Although these and these un-optimised programs are transliterated from the same original, some language implementations don't buffer stdout by default. Look for moderately optimized programs!

  source secs mem gz    
  Intel C #2 23.96 19,684 412    
  C gcc #2 25.05 19,684 412    
  C clang #2 25.50 19,684 412    
  Swift 26.45 19,440 400    
  C# aot #8 26.60 19,440 494    
  Go #8 26.68 19,440 500    
  Node.js 64.42 54,472 380    
  Dart 137.53 19,440 462    
 
 
  Here are the crowd sourced programs —  
 
 
× source secs mem gz cpu secs cpu load
1.0 Rust #4 0.94 33,408 1301 3.73 100% 100% 98% 100%
1.1 Rust #8 1.06 33,408 770 4.22 100% 100% 100% 100%
1.1 Rust #7 1.06 33,408 763 4.23 100% 99% 100% 100%
1.1 Rust #6 1.08 34,048 1338 4.23 100% 97% 97% 97%
1.2 Rust #5 1.13 34,048 725 4.43 100% 97% 98% 98%
1.2 Rust #3 1.14 19,860 1013 4.54 99% 100% 99% 99%
1.4 Chapel #3 1.29 37,760 582 5.12 99% 98% 99% 100%
1.7 C gcc #5 1.63 33,536 788 6.32 96% 97% 96% 100%
1.8 Julia #7 1.68 291,072 629 5.32 92% 83% 77% 66%
1.8 Julia #8 1.71 290,688 634 5.43 65% 94% 67% 90%
1.9 Julia #3 1.77 298,112 589 5.65 87% 98% 68% 67%
2.0 Julia #5 1.92 299,000 580 6.30 89% 72% 77% 92%
2.1 Julia #4 1.95 295,808 583 5.11 87% 81% 51% 42%
2.1 Rust 2.00 39,296 874 7.84 97% 98% 99% 98%
2.3 Julia #6 2.12 296,320 571 5.81 83% 53% 54% 84%
2.5 C++ g++ #0 2.36 35,456 2752 9.30 98% 99% 98% 99%
2.9 Intel Fortran #6 2.71 79,488 669 8.55 72% 72% 73% 98%
3.4 C# .NET #7 3.20 63,560 915 12.46 97% 97% 97% 99%
3.7 C++ g++ #9 3.50 35,072 732 13.49 95% 99% 95% 96%
4.0 Go #4 3.76 35,456 912 14.99 99% 99% 99% 99%
4.0 Go #3 3.77 35,456 900 15.00 99% 99% 99% 99%
4.1 Free Pascal #8 3.90 33,024 980 15.50 99% 99% 99% 99%
4.2 Ada 2012 GNAT #3 3.99 36,864 1825 15.78 99% 99% 99% 99%
4.3 Node.js #3 4.02 132,224 1128 15.91 99% 98% 98% 98%
4.3 C# .NET #5 4.04 66,356 851 15.80 97% 98% 99% 97%
4.3 Intel Fortran #8 4.07 78,976 965 16.17 99% 99% 99% 100%
4.3 Java  #2 4.08 82,216 802 16.06 98% 98% 99% 98%
4.4 Dart #4 4.16 71,680 988 16.29 98% 96% 99% 97%
4.4 Lisp SBCL #4 4.18 55,028 2453 16.65 99% 99% 99% 100%
4.4 Java #6 4.19 82,232 808 16.42 98% 99% 98% 97%
4.5 C gcc #9 4.23 33,280 700 16.34 95% 100% 95% 95%
4.7 Java #4 4.41 105,000 667 16.14 85% 97% 87% 97%
5.1 C++ g++ #8 4.84 34,944 749 13.21 37% 99% 37% 99%
5.3 Go 5.02 33,024 829 20.02 100% 99% 99% 99%
7.0 Haskell GHC #2 6.62 46,848 789 26.37 99% 100% 99% 99%
7.0 Chapel 6.63 37,632 447 26.46 99% 99% 99% 100%
7.1 Free Pascal #7 6.64 36,992 956 26.21 99% 99% 100% 97%
7.2 C# .NET #3 6.82 64,780 722 26.83 98% 98% 98% 99%
7.3 Go #2 6.85 33,152 843 27.28 99% 99% 100% 99%
7.3 Go #6 6.89 33,024 707 27.44 99% 99% 99% 99%
7.4 Java #3 6.96 82,972 910 27.54 98% 98% 99% 99%
7.6 F# .NET #2 7.11 39,084 1054 28.01 98% 98% 98% 99%
7.7 Swift #5 7.25 43,648 665 27.03 99% 91% 91% 91%
7.9 Free Pascal #6 7.47 36,096 809 29.75 100% 100% 99% 99%
8.1 OCaml 7.59 19,676 723 30.20 99% 99% 99% 99%
10 Lisp SBCL #3 9.79 54,784 900 26.14 33% 99% 99% 33%
10 Intel Fortran #4 9.85 79,744 626 25.23 91% 32% 90% 43%
12 Free Pascal #2 11.03 33,280 853 29.56 44% 87% 38% 99%
12 Free Pascal 11.04 33,280 853 29.59 43% 38% 93% 93%
13 Dart #6 11.88 80,384 914 31.82 99% 99% 34% 35%
14 C++ g++ #5 13.35 34,560 596 13.35 100% 0% 0% 0%
17 Dart #3 15.63 19,808 620 15.63 62% 0% 38% 0%
18 C++ g++ #2 16.94 34,560 700 16.94 82% 0% 0% 17%
25 PHP #3 23.38 48,256 881 93.15 99% 99% 99% 99%
26 Java 24.50 42,272 671 24.57 0% 100% 0% 0%
27 C gcc #2 25.05 19,684 412 25.04 92% 0% 0% 8%
28 Swift 26.45 19,440 400 26.45 100% 0% 0% 0%
28 Free Pascal #3 26.57 19,672 533 26.57 0% 0% 0% 100%
28 Go #8 26.68 19,440 500 26.74 100% 0% 0% 0%
29 Julia 26.83 261,760 379 27.22 62% 38% 1% 0%
29 C# .NET #8 27.23 26,532 494 27.23 0% 99% 0% 0%
29 C++ g++ #3 27.27 19,736 421 27.27 0% 0% 100% 0%
30 Ada 2012 GNAT #2 28.46 19,568 583 28.46 100% 0% 0% 0%
31 OCaml #6 28.76 19,676 450 28.76 0% 100% 0% 0%
31 Node.js #2 29.59 59,424 422 29.62 100% 0% 0% 0%
32 Dart #2 29.84 19,808 494 29.84 0% 100% 0% 0%
35 Intel Fortran #5 32.58 43,648 528 32.58 0% 100% 0% 0%
39 Haskell GHC 36.35 261,760 628 36.98 0% 10% 0% 90%
49 C# .NET #2 45.64 31,992 504 45.64 0% 15% 0% 84%
53 Racket 49.43 73,952 524 49.43 0% 100% 0% 0%
57 Erlang #4 53.98 83,592 813 215.09 99% 99% 99% 99%
61 Erlang #3 56.99 84,792 798 227.25 99% 99% 99% 99%
68 Node.js 64.42 54,472 380 64.53 98% 0% 0% 2%
92 PHP 87.00 19,804 452 87.00 0% 0% 100% 0%
108 VW Smalltalk #2 101.22 189,696 935 5 min 87% 89% 78% 94%
121 Lua #6 114.06 282,112 630 6 min 99% 88% 81% 83%
146 Dart 137.53 19,440 462 137.47 93% 0% 0% 6%
160 Ruby yjit #5 150.28 86,144 978 10 min 99% 99% 100% 99%
183 Python 3 #7 172.20 19,312 698 11 min 100% 99% 99% 100%
250 Python 3 #2 235.71 95,164 790 15 min 97% 100% 97% 97%
270 Ruby yjit #2 254.39 93,952 887 16 min 99% 100% 99% 99%
273 Python 3 #5 257.00 19,312 463 17 min 100% 100% 100% 100%
345 VW Smalltalk 5 min 55,168 609 5 min 0% 100% 0% 0%
367 Lua #3 5 min 19,656 364 5 min 0% 0% 0% 100%
371 Lua 5 min 19,656 365 5 min 0% 0% 0% 100%
400 Lua #2 6 min 19,656 373 6 min 0% 0% 0% 100%
530 Perl 8 min 76,928 592 32 min 100% 100% 100% 100%
693 Ruby yjit #4 10 min 135,516 853 10 min 34% 24% 15% 26%
  Python 3 #3 14 min 19,312 319 14 min 100% 0% 0% 0%
  Ruby yjit #3 26 min 20,992 313 26 min 100% 0% 0% 0%
  Matz's Ruby #5 40 min 68,480 978 2h 41 min 100% 100% 100% 100%
  Matz's Ruby #6 44 min 193,792 890 2h 47 min 94% 94% 94% 94%
  Matz's Ruby #2 45 min 71,168 887 3h 00 min 100% 99% 99% 100%
  Matz's Ruby #3 2h 24 min 19,860 313 2h 24 min 99% 0% 0% 0%
  Matz's Ruby #4 2h 29 min 147,424 853 2h 29 min 77% 0% 0% 22%
Erlang Bad Output
Erlang #2 Bad Output
Lisp SBCL Bad Output
Ruby yjit #6 Failed
Ruby yjit #7 Failed
Matz's Ruby #7 Failed
Swift #3 Bad Output
 
 
  hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu secs cpu load
0.9 C++ g++ 0.89 34,944 1797 3.47 97% 97% 97% 100%
1.0 C++ g++ #4 0.89 35,328 3554 3.47 100% 96% 96% 96%
1.0 C++ g++ #6 0.98 35,072 1014 3.90 100% 99% 99% 99%
1.4 C gcc #6 1.29 33,408 1147 5.13 100% 100% 100% 100%
1.5 Swift #7 1.38 49,024 1147 5.49 100% 99% 99% 99%
1.5 Haskell GHC #3 1.41 54,400 1985 5.59 100% 99% 99% 98%
1.5 Swift #6 1.46 51,840 1147 5.78 100% 99% 100% 99%
3.4 C# .NET 3.23 66,980 1980 12.62 97% 96% 97% 99%
3.4 C# .NET #9 3.25 66,864 822 12.60 97% 96% 96% 98%
3.7 C gcc #4 3.49 33,152 805 13.88 99% 99% 99% 100%
3.7 C gcc 3.50 32,768 828 13.93 99% 99% 100% 100%
3.7 C gcc #7 3.50 33,280 1000 13.91 99% 100% 99% 100%
3.7 C++ g++ #7 3.51 35,072 1023 13.94 99% 99% 99% 100%
3.8 C gcc #3 3.53 32,768 769 14.09 100% 99% 100% 100%
4.0 F# .NET #6 3.80 66,332 943 14.87 97% 97% 99% 97%
4.3 F# .NET 4.06 67,056 890 15.87 97% 99% 97% 97%
11 Racket #4 10.57 136,084 810 41.41 97% 97% 99% 97%
37 Racket #3 34.80 76,104 808 34.79 8% 91% 0% 0%
55 Racket #2 51.35 73,820 592 51.35 0% 0% 100% 0%