The Computer Language
24.11 Benchmarks Game

mandelbrot

First, here are a few naive un-optimised single-thread #8 programs transliterated lowest-common-denominator style into different programming languages from the same original —

  source secs mem gz    
  Intel C #8 23.96 19,496 412    
  C gcc #8 25.15 19,496 412    
  C clang #8 25.27 19,496 412    
  C# aot #8 25.56 19,620 492    
  Swift #8 25.59 19,492 426    
  Go #8 26.68 19,440 500    
  Node.js #8 72.49 56,116 412    
  Dart #8 202.26 19,492 471    
 
 
  Here are the crowd sourced programs —  
 
 
× source secs mem gz cpu secs cpu load
1.0 Rust #7 1.06 33,408 763 4.23 100% 99% 100% 100%
1.0 Rust #2 1.07 33,592 770 4.23 100% 99% 100% 100%
1.1 Rust #5 1.13 34,048 725 4.43 100% 97% 98% 98%
1.1 Rust #3 1.14 19,860 1013 4.54 99% 100% 99% 99%
1.2 Chapel #3 1.29 37,760 582 5.12 99% 98% 99% 100%
1.3 Julia #7 1.41 273,748 629 4.79 78% 78% 100% 85%
1.3 Julia #2 1.44 272,612 634 4.88 91% 83% 88% 78%
1.4 Julia #3 1.50 291,868 589 5.11 78% 84% 81% 99%
1.5 C gcc #5 1.63 33,512 788 6.31 96% 99% 96% 96%
1.5 Julia #5 1.63 296,828 580 5.76 92% 91% 87% 82%
1.8 Julia #4 1.96 283,940 583 5.12 80% 56% 81% 44%
1.9 Rust 2.00 39,296 874 7.84 97% 98% 99% 98%
2.0 Julia #6 2.12 289,896 571 5.80 59% 82% 84% 47%
2.2 C++ g++ #0 2.35 35,476 2752 9.30 98% 99% 99% 98%
2.5 Intel Fortran #6 2.71 79,488 669 8.55 72% 72% 73% 98%
3.3 C++ g++ #9 3.52 35,120 732 13.55 99% 95% 96% 95%
3.5 Go #4 3.76 35,456 912 14.99 99% 99% 99% 99%
3.5 Go #3 3.77 35,456 900 15.00 99% 99% 99% 99%
3.7 Free Pascal #5 3.90 33,116 980 15.50 99% 99% 99% 99%
3.8 Node.js #3 4.00 135,476 1128 15.83 99% 99% 99% 99%
3.8 Ada 2012 GNAT #3 4.00 37,036 1825 15.77 99% 98% 98% 99%
3.8 C# .NET #5 4.06 63,344 851 15.87 98% 97% 97% 99%
3.8 C gcc #9 4.07 33,128 700 15.70 95% 100% 95% 95%
3.8 Intel Fortran #7 4.08 79,508 965 16.18 99% 99% 99% 100%
3.8 Java  #2 4.08 82,216 802 16.06 98% 98% 99% 98%
3.9 Lisp SBCL #4 4.18 55,028 2453 16.65 99% 99% 99% 100%
3.9 Java #6 4.19 82,232 808 16.42 98% 99% 98% 97%
3.9 Dart #4 4.19 71,752 988 16.29 99% 96% 96% 98%
4.1 Java #4 4.41 105,000 667 16.14 85% 97% 87% 97%
4.7 Go 5.02 33,024 829 20.02 100% 99% 99% 99%
6.2 Haskell GHC #2 6.62 46,848 789 26.37 99% 100% 99% 99%
6.2 Chapel 6.63 37,632 447 26.46 99% 99% 99% 100%
6.2 Free Pascal #7 6.64 36,992 956 26.21 99% 99% 100% 97%
6.4 C# .NET #3 6.79 61,964 722 26.79 99% 98% 99% 98%
6.4 Go #2 6.85 33,152 843 27.28 99% 99% 100% 99%
6.5 Go #6 6.89 33,024 707 27.44 99% 99% 99% 99%
6.5 Java #3 6.96 82,972 910 27.54 98% 98% 99% 99%
6.7 F# .NET #2 7.11 41,304 1054 27.99 98% 98% 98% 99%
6.8 Swift #5 7.25 43,648 665 27.03 99% 91% 91% 91%
7.0 Free Pascal #6 7.47 36,096 809 29.75 100% 100% 99% 99%
7.1 OCaml 7.59 19,676 723 30.20 99% 99% 99% 99%
9.2 Lisp SBCL #3 9.79 54,784 900 26.14 33% 99% 99% 33%
9.3 Intel Fortran #4 9.85 79,744 626 25.23 91% 32% 90% 43%
10 Free Pascal #2 11.03 33,280 853 29.56 44% 87% 38% 99%
10 Free Pascal 11.04 33,280 853 29.59 43% 38% 93% 93%
11 Dart #6 11.87 80,176 914 31.84 63% 99% 71% 35%
13 C++ g++ #5 13.44 34,636 596 13.43 100% 0% 0% 0%
15 Dart #3 15.64 19,712 620 15.64 100% 0% 0% 0%
16 C++ g++ #2 16.95 34,636 700 16.94 36% 64% 0% 0%
23 Java 24.50 42,272 671 24.57 0% 100% 0% 0%
24 C gcc #8 25.15 19,496 412 25.15 71% 29% 0% 0%
24 Swift #8 25.59 19,492 426 25.59 0% 20% 40% 40%
25 C# .NET #8 26.41 29,820 492 26.41 23% 0% 76% 0%
25 Swift 26.45 19,440 400 26.45 100% 0% 0% 0%
25 Julia 26.55 254,964 379 26.63 77% 23% 0% 0%
25 Free Pascal #3 26.57 19,672 533 26.57 0% 0% 0% 100%
25 Go #8 26.68 19,440 500 26.74 100% 0% 0% 0%
26 C++ g++ #3 27.37 19,760 421 27.36 62% 37% 0% 0%
26 Java #8 27.67 45,844 441 27.79 31% 68% 0% 0%
27 Ada 2012 GNAT #2 28.44 19,772 583 28.44 36% 64% 0% 0%
27 OCaml #6 28.76 19,676 450 28.76 0% 100% 0% 0%
28 Node.js #2 29.36 61,144 422 29.39 68% 31% 0% 0%
28 Dart #2 29.86 19,712 494 29.85 34% 65% 0% 0%
31 Intel Fortran #5 32.58 43,648 528 32.58 0% 100% 0% 0%
34 Haskell GHC 36.35 261,760 628 36.98 0% 10% 0% 90%
43 C# .NET #2 46.19 29,604 504 46.19 22% 77% 0% 0%
46 Racket 49.43 73,952 524 49.43 0% 100% 0% 0%
51 Erlang #4 53.98 83,592 813 215.09 99% 99% 99% 99%
54 Erlang #3 56.99 84,792 798 227.25 99% 99% 99% 99%
66 Node.js 70.55 55,900 380 70.64 43% 54% 0% 2%
67 PHP #3 71.34 47,676 881 284.83 99% 99% 99% 100%
68 Node.js #8 72.49 56,116 412 72.52 56% 32% 0% 11%
95 VW Smalltalk #2 101.22 189,696 935 5 min 87% 89% 78% 94%
107 Lua #6 114.06 282,112 630 6 min 99% 88% 81% 83%
130 Dart 137.97 19,712 462 137.92 52% 40% 7% 0%
141 Ruby yjit #5 150.28 86,144 978 10 min 99% 99% 100% 99%
162 Python 3 #7 172.20 19,312 698 11 min 100% 99% 99% 100%
190 Dart #8 202.26 19,492 471 202.28 47% 45% 0% 6%
222 Python 3 #2 235.71 95,164 790 15 min 97% 100% 97% 97%
239 Ruby yjit #2 254.39 93,952 887 16 min 99% 100% 99% 99%
242 Python 3 #5 257.00 19,312 463 17 min 100% 100% 100% 100%
247 PHP 262.49 19,768 452 262.45 50% 49% 0% 0%
305 VW Smalltalk 5 min 55,168 609 5 min 0% 100% 0% 0%
325 Lua #3 5 min 19,656 364 5 min 0% 0% 0% 100%
328 Lua 5 min 19,656 365 5 min 0% 0% 0% 100%
354 Lua #2 6 min 19,656 373 6 min 0% 0% 0% 100%
396 PHP #8 7 min 19,768 419 7 min 48% 50% 0% 0%
469 Perl 8 min 76,928 592 32 min 100% 100% 100% 100%
613 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 #8 25 min 21,428 364 25 min 44% 48% 3% 4%
  Python 3 #8 25 min 19,364 379 25 min 49% 47% 3% 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
Matz's Ruby #8 Timed Out
Swift #3 Bad Output
 
 
  * possible hand-written vector instructions | "unsafe"
 
× source secs mem gz cpu secs cpu load
0.8 * C++ g++ #4 0.89 35,344 3554 3.45 96% 97% 98% 98%
0.8 * C++ g++ 0.89 34,952 1797 3.47 97% 97% 97% 100%
0.9 * Rust #4 0.94 33,408 1301 3.73 100% 100% 98% 100%
0.9 * C++ g++ #6 0.98 35,080 1014 3.87 99% 100% 100% 100%
1.0 * Rust #6 1.08 34,048 1338 4.23 100% 97% 97% 97%
1.2 * C gcc #6 1.28 33,400 1147 5.10 100% 100% 99% 100%
1.3 * Swift #7 1.38 49,024 1147 5.49 100% 99% 99% 99%
1.3 * Haskell GHC #3 1.41 54,400 1985 5.59 100% 99% 99% 98%
1.4 * Swift #6 1.46 51,840 1147 5.78 100% 99% 100% 99%
3.0 * C# .NET #7 3.21 66,484 915 12.50 99% 97% 97% 97%
3.3 * C gcc 3.49 32,864 828 13.92 100% 100% 100% 99%
3.3 * C gcc #7 3.51 33,276 1000 13.95 100% 99% 99% 99%
3.3 * C gcc #4 3.52 33,060 805 13.89 98% 100% 99% 98%
3.3 * C gcc #3 3.53 32,860 769 14.09 99% 100% 100% 100%
3.7 * C# .NET 3.93 64,440 1980 15.41 99% 98% 98% 98%
3.7 * C# .NET #9 3.93 64,332 822 15.45 98% 98% 99% 98%
3.9 * F# .NET #6 4.17 69,016 943 16.28 98% 98% 98% 99%
4.1 * F# .NET 4.39 69,508 890 17.25 97% 98% 97% 99%
4.6 * C++ g++ #7 4.86 35,176 749 13.28 99% 37% 37% 99%
10 * Racket #4 10.57 136,084 810 41.41 97% 97% 99% 97%
33 * Racket #3 34.80 76,104 808 34.79 8% 91% 0% 0%
48 * Racket #2 51.35 73,820 592 51.35 0% 0% 100% 0%