mandelbrot First, here are half-a-dozen naive un-optimised single-thread #8 programs transliterated line-by-line literal style into different programming languages from the same original — source secs mem gz C gcc #8 25.17 2,355 412 Python 3 #8 26 min 45,031 379 PHP #8 7 min 49,336 419 Ruby #8 15 min 50,926 364 Java #8 27.72 63,836 441 Node.js #8 70.31 68,338 412 Here are the crowd sourced programs — × source secs mem gz cpu secs 1.0 Free Pascal #3 26.61 319 533 26.60 7.4 C gcc #8 25.17 2,355 412 25.16 10 Go #8 26.70 3,199 500 26.76 15 OCaml #6 28.79 4,776 450 28.78 16 C++g++ #3 27.38 5,181 421 27.38 18 Ada 2012 GNAT #2 28.46 5,816 583 28.45 19 C# naot #8 25.58 6,115 492 25.56 19 C# naot #2 47.60 6,148 504 47.58 37 Dart aot #2 30.25 11,768 494 30.24 37 Dart aot #8 178.87 11,768 471 178.93 37 Dart aot 119.40 11,932 462 119.40 40 Swift 26.55 12,780 400 26.53 40 Swift #8 25.62 12,784 426 25.60 46 Rust #3 1.15 14,615 1013 4.57 51 Java naot #8 28.57 16,392 441 28.56 51 PHP 258.19 16,437 452 258.12 56 Dart aot #3 15.69 17,887 620 15.69 62 Java naot 30.59 19,927 671 30.57 110 Go #6 6.91 35,119 707 27.47 110 Free Pascal 11.06 35,152 853 29.61 110 Free Pascal #2 11.07 35,160 853 29.61 111 C gcc #9 4.07 35,394 700 15.72 111 Free Pascal #5 3.91 35,529 980 15.52 111 Go #2 6.87 35,549 843 27.30 111 C gcc #5 1.64 35,582 788 6.32 112 Rust #2 1.10 35,754 770 4.37 112 Go 5.04 35,787 829 20.04 112 Rust #7 1.10 35,906 763 4.34 114 Rust #5 1.12 36,311 725 4.37 114 Lua #2 6 min 36,393 373 6 min 115 Lua 5 min 36,647 365 5 min 115 Lua #3 5 min 36,696 364 5 min 115 C++ g++ #2 16.96 36,704 700 16.95 115 C++ g++ #5 13.47 36,884 596 13.47 119 C++ g++ #9 3.53 37,863 732 13.59 119 Go #4 3.77 37,970 912 15.01 119 Go #3 3.78 38,101 900 15.02 120 C++ g++ #0 2.36 38,281 2752 9.31 121 Free Pascal #6 7.47 38,654 809 29.76 124 Free Pascal #7 6.61 39,596 956 26.26 124 C# naot #3 6.69 39,715 722 26.52 128 C# naot #5 4.02 40,743 851 15.88 129 Ada 2012 GNAT #3 4.01 41,099 1825 15.79 131 Chapel 6.69 41,697 447 26.49 132 Chapel #3 1.18 42,156 582 4.51 133 Rust 2.01 42,631 874 7.89 141 Python 3 #8 26 min 45,031 379 26 min 141 Python 3 #3 14 min 45,085 319 14 min 141 Dart aot #4 4.29 45,175 988 16.80 148 Intel Fortran #5 32.66 47,174 528 32.65 154 Swift #5 7.27 49,312 665 27.09 154 PHP #8 7 min 49,336 419 7 min 156 F# #2 7.17 49,979 1054 28.09 158 Ruby #3 29 min 50,524 313 28 min 159 Ruby #8 15 min 50,926 364 15 min 160 Haskell GHC #2 6.64 51,057 789 26.39 168 PHP #3 68.29 53,531 881 272.31 182 Java naot #2 4.01 58,278 802 15.87 183 Java naot #6 3.96 58,348 808 15.66 188 Lisp SBCL #3 9.82 60,191 900 26.17 190 Lisp SBCL #4 4.20 60,654 2453 16.67 190 Lisp SBCL 4.53 60,678 2478 16.61 193 Python 3 #5 260.63 61,620 463 17 min 195 Python 3 #7 182.94 62,173 698 12 min 197 Java naot #3 7.80 63,054 910 30.99 202 OCaml 7.60 64,643 723 30.20 214 Node.js #8 70.31 68,338 412 70.38 216 Node.js 69.02 69,100 380 69.10 230 Node.js #2 29.41 73,617 422 29.42 259 Java naot #4 4.27 82,633 667 15.75 265 Dart aot #6 11.74 84,529 914 31.43 268 Intel Fortran #7 4.09 85,639 965 16.19 269 Intel Fortran #6 2.72 85,975 669 8.55 270 Intel Fortran #4 9.89 86,360 626 25.29 290 Erlang #3 56.92 92,709 798 226.57 307 Erlang #4 53.86 98,140 813 214.33 359 Perl 8 min 114,569 592 32 min 371 Ruby #5 143.13 118,436 978 9 min 393 Racket 49.62 125,587 524 49.55 397 Ruby #2 167.51 126,730 887 11 min 453 Node.js #3 4.05 144,757 1128 15.86 532 Ruby #4 9 min 169,955 853 9 min 549 Pharo Smalltalk #2 5 min 175,542 574 5 min 552 Pharo Smalltalk 6 min 176,222 573 6 min 723 Python 3 #2 237.64 230,973 790 15 min Haskell GHC 36.39 271,733 628 37.10 Julia 26.66 339,132 379 26.69 Julia #2 1.57 355,762 634 4.95 Julia #7 1.54 357,138 629 4.85 Julia #4 2.07 368,173 583 5.18 Julia #6 2.25 368,599 571 5.87 Julia #3 1.61 376,463 589 5.17 Julia #5 1.76 381,813 580 5.83 Lua #6 115.81 652,812 630 6 min Erlang Bad Output Erlang #2 Bad Output Ruby #6 Timed Out Ruby #7 Timed Out Swift #3 Bad Output * possible hand-written vector instructions or "unsafe" × source secs mem gz cpu secs 109 * C gcc #3 3.55 34,873 769 14.12 110 * C gcc 3.50 35,017 828 13.93 110 * C gcc #4 3.50 35,197 805 13.89 111 * C gcc #7 3.51 35,447 1000 13.93 111 * C gcc #6 1.29 35,578 1147 5.11 111 * Rust #4 0.95 35,598 1301 3.78 114 * Rust #6 1.08 36,426 1338 4.20 118 * C++ g++ 0.90 37,626 1797 3.48 119 * C++ g++ #6 0.98 37,908 1014 3.88 119 * C++ g++ #4 0.89 37,941 3554 3.46 119 * C++ g++ #7 4.87 38,048 749 13.29 121 * C# naot #9 3.77 38,797 822 14.94 122 * C# naot #7 2.96 39,088 915 11.73 123 * C# naot 3.76 39,240 1980 14.95 181 * Swift #7 1.35 57,836 1147 5.29 184 * Haskell GHC #3 1.39 58,700 1985 5.44 191 * Swift #6 1.48 60,985 1147 5.80 241 * F# 4.42 77,042 890 17.21 242 * F# #6 4.18 77,173 943 16.25 392 * Racket #2 51.46 125,395 592 51.40 401 * Racket #3 34.91 127,980 808 34.85 596 * Racket #4 10.68 190,411 810 41.52 by secs by mem by gz by cpu secs