Newer
Older
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="all">
<meta name="description" content="mandelbrot - Which programs are fastest? — How fast programs generate a Mandelbrot set and write a portable bitmap.">
<title>mandelbrot - Which programs are fastest? (Benchmarks Game) </title>
a{color:black;text-decoration:none}article,footer{padding:0 0 2.9em}article,div,footer,header{margin:auto;width:92%}body{font:100% Droid Sans, Ubuntu, Verdana, sans-serif;margin:0;-webkit-text-size-adjust:100%}h3, h1, h2, li a{font-family:Ubuntu Mono,Consolas,Menlo,monospace}div,footer,header{max-width:31em}h3{font-size:1.4em;font-weight:bold;margin:0;padding: .4em}h3, h3 a{color:white;background-color:#77216f}h3 small{font-size:0.64em}h1,h2{margin:1.5em 0 0}h1{font-size:1.4em;font-weight:normal}h2{font-size:1.2em}li{list-style-type:none}li a{display:block;font-size:1.2em;margin: .5em .5em 0;padding: .5em .5em .3em}ul{clear:left;margin:-0.3em 0 1.5em;padding-left:0;text-align:center}p{color:#333;line-height:1.4;margin: .3em 0 0}.external{border-bottom:.1em dashed #333}p a,span{border-bottom: .1em solid #333;padding-bottom: .1em}.best{font-weight:bold}.message{font-size: .8em}img{display:block;width:100%}table{color:#333;margin:1.3em auto 0;text-align:right}tbody::after{content:"-";display:block;line-height:2.6em;visibility:hidden}td{border-bottom: .15em dotted #eee;padding: .7em 0 0 1em}td a, th a{display:block}th{font-weight:normal;padding:0 0 0 1em}td:first-child{padding-left:0}td:nth-child(2),th:nth-child(2){text-align:left}
@media only screen{th:nth-child(1),td:nth-child(1),th:nth-child(4),td:nth-child(4),th:nth-child(5),td:nth-child(5),th:nth-child(6),td:nth-child(6),th:nth-child(7),td:nth-child(7){display:none}}
@media only screen and (min-width:23em){th:nth-child(1),td:nth-child(1){display:table-cell}}@media only screen and (min-width:37em){th:nth-child(3),td:nth-child(3),th:nth-child(4),td:nth-child(4),th:nth-child(5),td:nth-child(5),th:nth-child(6),td:nth-child(6){display:table-cell}li{display:inline-block}}@media only screen and (min-width:43em){th:nth-child(7),td:nth-child(7){display:table-cell}}@media only screen and (min-width:60em){article,footer,header{font-size:1.25em}}
--></style>
<link rel="shortcut icon" href="../favicon.ico">
<header>
<h3><a href="https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html">The <small>Computer Language</small><br>24.12 Benchmarks Game</a></h3>
<aside>
<p><a href="../description/mandelbrot.html#mandelbrot">description</a>
</aside>
<p>First, here are half-a-dozen naive <strong>un-optimised</strong> single-thread <q>#8</q> programs <a href="../performance/comparable.html">transliterated</a> lowest-common-denominator style into different programming languages from the same original —
<td><a href="../program/mandelbrot-gcc-8.html"><span>C gcc #8</span></a>
<td><a href="../program/mandelbrot-java-8.html"><span>Java #8</span></a>
<td>27.67
<td>45,844
<td>441
<td><a href="../program/mandelbrot-node-8.html"><span>Node.js #8</span></a>
<td>72.49
<td>56,116
<td>412
<td><a href="../program/mandelbrot-php-8.html"><span>PHP #8</span></a>
<td>7 min
<td>19,768
<td>419
<td><a href="../program/mandelbrot-ruby-8.html"><span>Ruby yjit #8</span></a>
<td><a href="../program/mandelbrot-python3-8.html"><span>Python 3 #8</span></a>
<td>25 min
<td>19,364
<td>379
<th colspan="3">Here are the <strong>crowd sourced</strong> programs —
<th>×
<th>source
<th class="best">secs
<th><a href="./mandelbrot-mem.html"><span>mem</span></a>
<th><a href="./mandelbrot-gz.html"><span>gz</span></a>
<th><a href="./mandelbrot-cpu.html"><span>cpu secs</span></a>
<td><a href="../program/mandelbrot-rust-2.html"><span><strong>Rust</strong> #2</span></a>
<td class="best">1.09
<td>33,384
<td>770
<td>4.33
<td class="message">100% 100% 100% 99%
<td><a href="../program/mandelbrot-rust-7.html"><span>Rust #7</span></a>
<td>1.10
<td>33,380
<td>763
<td>4.37
<td class="message">99% 100% 100% 99%
<td><a href="../program/mandelbrot-rust-5.html"><span>Rust #5</span></a>
<tr>
<td>1.0
<td><a href="../program/mandelbrot-chapel-3.html"><span><strong>Chapel</strong> #3</span></a>
<td class="best">1.14
<td>37,780
<td>582
<td>4.51
<td class="message">99% 99% 99% 100%
<td><a href="../program/mandelbrot-rust-3.html"><span>Rust #3</span></a>
<td><a href="../program/mandelbrot-julia-7.html"><span><strong>Julia</strong> #7</span></a>
<td>4.79
<td class="message">78% 78% 100% 85%
<td>1.3
<td><a href="../program/mandelbrot-julia-2.html"><span>Julia #2</span></a>
<td><a href="../program/mandelbrot-julia-3.html"><span>Julia #3</span></a>
<td>5.11
<td class="message">78% 84% 81% 99%
<td><a href="../program/mandelbrot-gcc-5.html"><span><strong>C</strong> gcc #5</span></a>
<td class="best">1.63
<td>33,512
<td>788
<td>6.31
<td class="message">96% 99% 96% 96%
<tr>
<td><a href="../program/mandelbrot-julia-5.html"><span>Julia #5</span></a>
<td>5.76
<td class="message">92% 91% 87% 82%
<td><a href="../program/mandelbrot-julia-4.html"><span>Julia #4</span></a>
<td>5.12
<td class="message">80% 56% 81% 44%
<td><a href="../program/mandelbrot-rust-1.html"><span>Rust</span></a>
<td><a href="../program/mandelbrot-julia-6.html"><span>Julia #6</span></a>
<td>5.80
<td class="message">59% 82% 84% 47%
<td><a href="../program/mandelbrot-gpp-0.html"><span><strong>C++</strong> g++ #0</span></a>
<td><a href="../program/mandelbrot-ifx-6.html"><span>Intel <strong>Fortran</strong> #6</span></a>
<td class="best">2.71
<td>79,488
<td>669
<td>8.55
<td class="message">72% 72% 73% 98%
<td><a href="../program/mandelbrot-gpp-9.html"><span>C++ g++ #9</span></a>
<td>13.55
<td class="message">99% 95% 96% 95%
<td><a href="../program/mandelbrot-go-4.html"><span><strong>Go</strong> #4</span></a>
<td><a href="../program/mandelbrot-go-3.html"><span>Go #3</span></a>
<td><a href="../program/mandelbrot-fpascal-5.html"><span>Free <strong>Pascal</strong> #5</span></a>
<td><a href="../program/mandelbrot-node-3.html"><span><strong>Node.js</strong> #3</span></a>
<td>15.83
<td class="message">99% 99% 99% 99%
<td><a href="../program/mandelbrot-gnat-3.html"><span><strong>Ada</strong> 2012 GNAT #3</span></a>
<td class="best">4.00
<td>37,036
<td>1825
<td>15.77
<td class="message">99% 98% 98% 99%
<td><a href="../program/mandelbrot-csharpcore-5.html"><span><strong>C#</strong> .NET #5</span></a>
<td>15.87
<td class="message">98% 97% 97% 99%
<td><a href="../program/mandelbrot-gcc-9.html"><span>C gcc #9</span></a>
<td>4.07
<td>33,128
<td>700
<td>15.70
<td class="message">95% 100% 95% 95%
<td><a href="../program/mandelbrot-ifx-7.html"><span>Intel Fortran #7</span></a>
<td>4.08
<td>79,508
<td><a href="../program/mandelbrot-java-2.html"><span><strong>Java</strong> #2</span></a>
<td><a href="../program/mandelbrot-sbcl-4.html"><span><strong>Lisp</strong> SBCL #4</span></a>
<td><a href="../program/mandelbrot-java-6.html"><span>Java #6</span></a>
<td>4.19
<td>82,232
<td>808
<td>16.42
<td class="message">98% 99% 98% 97%
<td><a href="../program/mandelbrot-dartexe-4.html"><span><strong>Dart</strong> #4</span></a>
<td class="best">4.19
<td>71,752
<td>988
<td>16.29
<td class="message">99% 96% 96% 98%
<td><a href="../program/mandelbrot-java-4.html"><span>Java #4</span></a>
<td><a href="../program/mandelbrot-go-1.html"><span>Go</span></a>
<td><a href="../program/mandelbrot-ghc-2.html"><span><strong>Haskell</strong> GHC #2</span></a>
<td class="best">6.62
<td>46,848
<td>789
<td>26.37
<td class="message">99% 100% 99% 99%
<td><a href="../program/mandelbrot-fpascal-7.html"><span>Free Pascal #7</span></a>
<td>6.64
<td>36,992
<td>956
<td>26.21
<td class="message">99% 99% 100% 97%
<tr>
<td>6.1
<td><a href="../program/mandelbrot-chapel-1.html"><span>Chapel</span></a>
<td>6.64
<td>37,820
<td>447
<td>26.47
<td class="message">99% 99% 99% 99%
<td><a href="../program/mandelbrot-csharpcore-3.html"><span>C# .NET #3</span></a>
<td>26.79
<td class="message">99% 98% 99% 98%
<td><a href="../program/mandelbrot-go-2.html"><span>Go #2</span></a>
<td><a href="../program/mandelbrot-go-6.html"><span>Go #6</span></a>
<td><a href="../program/mandelbrot-java-3.html"><span>Java #3</span></a>
<td>6.96
<td>82,972
<td>910
<td>27.54
<td class="message">98% 98% 99% 99%
<td><a href="../program/mandelbrot-fsharpcore-2.html"><span><strong>F#</strong> .NET #2</span></a>
<td><a href="../program/mandelbrot-swift-5.html"><span><strong>Swift</strong> #5</span></a>
<td><a href="../program/mandelbrot-fpascal-6.html"><span>Free Pascal #6</span></a>
<td>809
<td>29.75
<td class="message">100% 100% 99% 99%
<td><a href="../program/mandelbrot-ocaml-1.html"><span><strong>OCaml</strong></span></a>
<td><a href="../program/mandelbrot-sbcl-3.html"><span>Lisp SBCL #3</span></a>
<td><a href="../program/mandelbrot-ifx-4.html"><span>Intel Fortran #4</span></a>
<td>9.85
<td>79,744
<td>25.23
<td class="message">91% 32% 90% 43%
<td><a href="../program/mandelbrot-fpascal-2.html"><span>Free Pascal #2</span></a>
<td>11.03
<td>33,280
<td>853
<td>29.56
<td class="message">44% 87% 38% 99%
<td><a href="../program/mandelbrot-fpascal-1.html"><span>Free Pascal</span></a>
<td><a href="../program/mandelbrot-dartexe-6.html"><span>Dart #6</span></a>
<td><a href="../program/mandelbrot-gpp-5.html"><span>C++ g++ #5</span></a>
<td><a href="../program/mandelbrot-dartexe-3.html"><span>Dart #3</span></a>
<td><a href="../program/mandelbrot-gpp-2.html"><span>C++ g++ #2</span></a>
<td><a href="../program/mandelbrot-java-1.html"><span>Java</span></a>
<td>24.50
<td>42,272
<td>671
<td>24.57
<td class="message">0% 100% 0% 0%
<td><a href="../program/mandelbrot-gcc-8.html"><span>C gcc #8</span></a>
<td><a href="../program/mandelbrot-swift-8.html"><span>Swift #8</span></a>
<td>25.59
<td>19,492
<td>426
<td>25.59
<td class="message">0% 20% 40% 40%
<td><a href="../program/mandelbrot-csharpcore-8.html"><span>C# .NET #8</span></a>
<td>26.41
<td>29,820
<td>492
<td>26.41
<td class="message">23% 0% 76% 0%
<td><a href="../program/mandelbrot-swift-1.html"><span>Swift</span></a>
<td>26.45
<td class="message">100% 0% 0% 0%
<td><a href="../program/mandelbrot-julia-1.html"><span>Julia</span></a>
<td>26.55
<td>254,964
<td>379
<td>26.63
<td class="message">77% 23% 0% 0%
<td><a href="../program/mandelbrot-fpascal-3.html"><span>Free Pascal #3</span></a>
<td>26.57
<td class="message">0% 0% 0% 100%
<td><a href="../program/mandelbrot-go-8.html"><span>Go #8</span></a>
<td>26.68
<td>19,440
<td>500
<td>26.74
<td class="message">100% 0% 0% 0%
<td><a href="../program/mandelbrot-gpp-3.html"><span>C++ g++ #3</span></a>
<td>27.36
<td class="message">62% 37% 0% 0%
<td><a href="../program/mandelbrot-java-8.html"><span>Java #8</span></a>
<td>27.67
<td>45,844
<td>441
<td>27.79
<td class="message">31% 68% 0% 0%
<td><a href="../program/mandelbrot-gnat-2.html"><span>Ada 2012 GNAT #2</span></a>
<td>28.44
<td class="message">36% 64% 0% 0%
<td><a href="../program/mandelbrot-ocaml-6.html"><span>OCaml #6</span></a>
<td><a href="../program/mandelbrot-node-2.html"><span>Node.js #2</span></a>
<td>29.39
<td class="message">68% 31% 0% 0%
<td><a href="../program/mandelbrot-dartexe-2.html"><span>Dart #2</span></a>
<td><a href="../program/mandelbrot-ifx-5.html"><span>Intel Fortran #5</span></a>
<td>32.58
<td>43,648
<td>528
<td>32.58
<td class="message">0% 100% 0% 0%
<td><a href="../program/mandelbrot-ghc-1.html"><span>Haskell GHC</span></a>
<td>36.35
<td>261,760
<td>628
<td>36.98
<td class="message">0% 10% 0% 90%
<td><a href="../program/mandelbrot-csharpcore-2.html"><span>C# .NET #2</span></a>
<td>46.19
<td class="message">22% 77% 0% 0%
<td><a href="../program/mandelbrot-racket-1.html"><span><strong>Racket</strong></span></a>
<td><a href="../program/mandelbrot-erlang-4.html"><span><strong>Erlang</strong> #4</span></a>
<td><a href="../program/mandelbrot-erlang-3.html"><span>Erlang #3</span></a>
<td><a href="../program/mandelbrot-node-1.html"><span>Node.js</span></a>
<td>70.64
<td class="message">43% 54% 0% 2%
<td><a href="../program/mandelbrot-php-3.html"><span><strong>PHP</strong> #3</span></a>
<td class="best">71.34
<td>47,676
<td>881
<td>284.83
<td class="message">99% 99% 99% 100%
<td><a href="../program/mandelbrot-node-8.html"><span>Node.js #8</span></a>
<td>72.49
<td>56,116
<td>412
<td>72.52
<td class="message">56% 32% 0% 11%
<td><a href="../program/mandelbrot-vw-2.html"><span>VW <strong>Smalltalk</strong> #2</span></a>
<td><a href="../program/mandelbrot-lua-6.html"><span><strong>Lua</strong> #6</span></a>
<td><a href="../program/mandelbrot-dartexe-1.html"><span>Dart</span></a>
<td><a href="../program/mandelbrot-ruby-5.html"><span><strong>Ruby</strong> yjit #5</span></a>
<td>9 min
<td class="message">100% 99% 100% 99%
<tr>
<td>152
<td><a href="../program/mandelbrot-ruby-2.html"><span>Ruby yjit #2</span></a>
<td>165.71
<td>87,360
<td>887
<td>11 min
<td class="message">99% 99% 99% 99%
<td><a href="../program/mandelbrot-python3-7.html"><span><strong>Python 3</strong> #7</span></a>
<td>11 min
<td class="message">100% 99% 99% 100%
<td><a href="../program/mandelbrot-dartexe-8.html"><span>Dart #8</span></a>
<td>202.26
<td>19,492
<td>471
<td>202.28
<td class="message">47% 45% 0% 6%
<td><a href="../program/mandelbrot-python3-2.html"><span>Python 3 #2</span></a>
<td>15 min
<td class="message">97% 100% 97% 97%
<tr>
<td><a href="../program/mandelbrot-python3-5.html"><span>Python 3 #5</span></a>
<td>257.00
<td>19,312
<td>463
<td>17 min
<td class="message">100% 100% 100% 100%
<td><a href="../program/mandelbrot-php-1.html"><span>PHP</span></a>
<td>262.49
<td>19,768
<td>452
<td>262.45
<td class="message">50% 49% 0% 0%
<td><a href="../program/mandelbrot-vw-1.html"><span>VW Smalltalk</span></a>
<td>5 min
<td><a href="../program/mandelbrot-lua-3.html"><span>Lua #3</span></a>
<td>5 min
<td><a href="../program/mandelbrot-lua-1.html"><span>Lua</span></a>
<td>5 min
<td><a href="../program/mandelbrot-lua-2.html"><span>Lua #2</span></a>
<td>6 min
<td><a href="../program/mandelbrot-php-8.html"><span>PHP #8</span></a>
<td>7 min
<td>19,768
<td>419
<td>7 min
<td class="message">48% 50% 0% 0%
<td><a href="../program/mandelbrot-perl-1.html"><span><strong>Perl</strong></span></a>
<td><a href="../program/mandelbrot-ruby-4.html"><span>Ruby yjit #4</span></a>
<td>9 min
<td class="message">30% 34% 25% 9%
<tr>
<td>
<td><a href="../program/mandelbrot-python3-3.html"><span>Python 3 #3</span></a>
<td>14 min
<td class="message">100% 0% 0% 0%
<tr>
<td>
<td><a href="../program/mandelbrot-ruby-8.html"><span>Ruby yjit #8</span></a>
<td>15 min
<td class="message">48% 51% 0% 0%
<tr>
<td>
<td><a href="../program/mandelbrot-python3-8.html"><span>Python 3 #8</span></a>
<td>25 min
<td>19,364
<td>379
<td>25 min
<td class="message">49% 47% 3% 0%
<td><a href="../program/mandelbrot-ruby-3.html"><span>Ruby yjit #3</span></a>
<td>28 min
<td class="message">48% 46% 2% 2%
<td><a href="../program/mandelbrot-mri-5.html"><span>Matz's <strong>Ruby</strong> #5</span></a>
<td class="best">40 min
<td>68,480
<td>978
<td>2h 41 min
<td class="message">100% 100% 100% 100%
<tr>
<td>
<td><a href="../program/mandelbrot-mri-6.html"><span>Matz's Ruby #6</span></a>
<td>44 min
<td>193,792
<td>2h 47 min
<td class="message">94% 94% 94% 94%
<tr>
<td>
<td><a href="../program/mandelbrot-mri-2.html"><span>Matz's Ruby #2</span></a>
<td>71,168
<td>887
<td>3h 00 min
<td class="message">100% 99% 99% 100%
<tr>
<td>
<td><a href="../program/mandelbrot-mri-3.html"><span>Matz's Ruby #3</span></a>
<td>2h 24 min
<td>19,860
<td>313
<td>2h 24 min
<td class="message">99% 0% 0% 0%
<tr>
<td>
<td><a href="../program/mandelbrot-mri-4.html"><span>Matz's Ruby #4</span></a>
<td>2h 29 min
<td>147,424
<td>853
<td>2h 29 min
<td class="message">77% 0% 0% 22%
<tr>
<td>
<td><a href="../program/mandelbrot-erlang-1.html"><span>Erlang</span></a>
<td class="message">Bad Output
<td>
<td>
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-erlang-2.html"><span>Erlang #2</span></a>
<td class="message">Bad Output
<td>
<td>
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-sbcl-1.html"><span>Lisp SBCL</span></a>
<td class="message">Bad Output
<td>
<td>
<td>
<td>
<td><a href="../program/mandelbrot-ruby-6.html"><span>Ruby yjit #6</span></a>
<td><a href="../program/mandelbrot-ruby-7.html"><span>Ruby yjit #7</span></a>
<td><a href="../program/mandelbrot-mri-7.html"><span>Matz's Ruby #7</span></a>
<tr>
<td>
<td><a href="../program/mandelbrot-mri-8.html"><span>Matz's Ruby #8</span></a>
<td class="message">Timed Out
<td>
<td>
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-swift-3.html"><span>Swift #3</span></a>
<td class="message">Bad Output
<td>
<td>
<td>
<td>
<tr>
<th colspan='7'>
<tr>
<th colspan='7'>
<tr>
<th id="intrinsics" colspan="6"><strong>* possible hand-written vector instructions | "unsafe"</strong>
<td><a href="../program/mandelbrot-gpp-4.html"><span>* C++ g++ #4</span></a>
<td>0.89
<td>35,344
<td>3554
<td>3.45
<td class="message">96% 97% 98% 98%
<td><a href="../program/mandelbrot-gpp-1.html"><span>* C++ g++</span></a>
<td>3.47
<td class="message">97% 97% 97% 100%
<td>0.9
<td><a href="../program/mandelbrot-rust-4.html"><span>* Rust #4</span></a>
<td>3.77
<td class="message">100% 100% 100% 100%