Newer
Older
<!DOCTYPE html>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="all">
<meta name="description" content="mandelbrot — How fast programs generate a Mandelbrot set and write a portable bitmap.">
<title>mandelbrot | Computer Language Benchmarks Game </title>
<style><!--
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}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>22.01 Benchmarks Game</a></h3>
<aside>
<p><a href="../description/mandelbrot.html#mandelbrot">description</a>
</aside>
</div>
<section>
<div>
<h2></h2>
<p>Always look at the source code.
<p>Look at the slower simple sequential programs, <em>and</em> look at the parallel programs written for multicore, <em>and</em> look at the manually vectorized SIMD programs. Choose which you want to compare.
<h2></h2>
</div>
<table>
<tr>
<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>busy</span></a>
<th>cpu load
<tr>
<td>1.0
<td><a href="../program/mandelbrot-gpp-4.html"><span><strong>C++</strong> g++ #4</span></a>
<td class="best">0.84
<tr>
<td>1.1
<td><a href="../program/mandelbrot-gpp-1.html"><span>C++ g++</span></a>
<td>0.89
<td><a href="../program/mandelbrot-rust-7.html"><span><strong>Rust</strong> #7</span></a>
<td class="best">0.91
<td>3.63
<td class="message">100% 99% 99% 100%
<td><a href="../program/mandelbrot-rust-8.html"><span>Rust #8</span></a>
<td>3.69
<td class="message">100% 100% 99% 100%
<tr>
<td>1.2
<td><a href="../program/mandelbrot-gpp-6.html"><span>C++ g++ #6</span></a>
<td><a href="../program/mandelbrot-rust-5.html"><span>Rust #5</span></a>
<tr>
<td>1.3
<td><a href="../program/mandelbrot-rust-6.html"><span>Rust #6</span></a>
<td>4.30
<td class="message">99% 100% 98% 98%
<tr>
<td>1.5
<td><a href="../program/mandelbrot-gcc-6.html"><span><strong>C</strong> gcc #6</span></a>
<tr>
<td>1.6
<td><a href="../program/mandelbrot-swift-7.html"><span><strong>Swift</strong> #7</span></a>
<td><a href="../program/mandelbrot-swift-6.html"><span>Swift #6</span></a>
<td><a href="../program/mandelbrot-ifc-8.html"><span>Classic <strong>Fortran</strong> #8</span></a>
<td class="best">1.41
<td>36,008
<td>957
<td>5.59
<td class="message">99% 99% 99% 99%
<tr>
<td>1.7
<td><a href="../program/mandelbrot-julia-7.html"><span><strong>Julia</strong> #7</span></a>
<td class="best">1.42
<td>236,720
<td>619
<td>5.08
<td class="message">87% 87% 87% 99%
<tr>
<td>1.7
<td><a href="../program/mandelbrot-rust-3.html"><span>Rust #3</span></a>
<td>1.42
<td>13,208
<td>1007
<td>5.66
<td class="message">100% 99% 100% 100%
<td>1.7
<td><a href="../program/mandelbrot-julia-8.html"><span>Julia #8</span></a>
<td>1.46
<td>236,608
<td>624
<td>5.24
<td class="message">86% 86% 99% 87%
<tr>
<td>1.8
<td><a href="../program/mandelbrot-ghc-3.html"><span><strong>Haskell</strong> GHC #3</span></a>
<td class="best">1.48
<td>51,352
<td>1981
<td>5.81
<td class="message">99% 99% 98% 99%
<td><a href="../program/mandelbrot-julia-5.html"><span>Julia #5</span></a>
<td>5.96
<td class="message">89% 99% 90% 90%
<tr>
<td>2.4
<td><a href="../program/mandelbrot-julia-6.html"><span>Julia #6</span></a>
<td>2.03
<td>265,020
<td>562
<td>5.89
<td class="message">90% 60% 50% 91%
<tr>
<td>2.5
<td><a href="../program/mandelbrot-julia-3.html"><span>Julia #3</span></a>
<td><a href="../program/mandelbrot-julia-4.html"><span>Julia #4</span></a>
<td><a href="../program/mandelbrot-rust-1.html"><span>Rust</span></a>
<td>11.60
<td class="message">99% 99% 96% 99%
<td>3.7
<td><a href="../program/mandelbrot-csharpcore-9.html"><span><strong>C#</strong> .NET #9</span></a>
<td class="best">3.11
<td>65,960
<td>816
<td>12.18
<td class="message">97% 99% 98% 97%
<tr>
<td>3.7
<td><a href="../program/mandelbrot-csharpcore-1.html"><span>C# .NET</span></a>
<td>3.11
<td>66,112
<td>3.7
<td><a href="../program/mandelbrot-gcc-8.html"><span>C gcc #8</span></a>
<td>3.13
<td>32,816
<td>782
<td>12.12
<td class="message">99% 94% 100% 94%
<td><a href="../program/mandelbrot-ifc-6.html"><span>Classic Fortran #6</span></a>
<tr>
<td>4.0
<td><a href="../program/mandelbrot-chapel-3.html"><span><strong>Chapel</strong> #3</span></a>
<td class="message">99% 99% 99% 99%
<tr>
<td>4.1
<td><a href="../program/mandelbrot-gcc-4.html"><span>C gcc #4</span></a>
<td><a href="../program/mandelbrot-gpp-7.html"><span>C++ g++ #7</span></a>
<tr>
<td>4.2
<td><a href="../program/mandelbrot-gcc-1.html"><span>C gcc</span></a>
<tr>
<td>4.2
<td><a href="../program/mandelbrot-gcc-7.html"><span>C gcc #7</span></a>
<td>3.50
<td>33,092
<td>994
<td>13.97
<td class="message">100% 100% 100% 99%
<tr>
<td>4.2
<td><a href="../program/mandelbrot-gpp-9.html"><span>C++ g++ #9</span></a>
<td>3.50
<tr>
<td>4.2
<td><a href="../program/mandelbrot-gcc-3.html"><span>C gcc #3</span></a>
<td>4.4
<td><a href="../program/mandelbrot-fsharpcore-6.html"><span><strong>F#</strong> .NET #6</span></a>
<td class="best">3.72
<td>65,928
<td>933
<td>14.61
<td class="message">98% 99% 98% 98%
<tr>
<td>4.4
<td><a href="../program/mandelbrot-go-4.html"><span><strong>Go</strong> #4</span></a>
<td class="best">3.73
<tr>
<td>4.5
<td><a href="../program/mandelbrot-go-3.html"><span>Go #3</span></a>
<td>3.75
<tr>
<td>4.6
<td><a href="../program/mandelbrot-fpascal-8.html"><span>Free <strong>Pascal</strong> #8</span></a>
<td class="best">3.89
<td>31,316
<td>952
<td>15.49
<td class="message">99% 100% 100% 99%
<td><a href="../program/mandelbrot-fsharpcore-5.html"><span>F# .NET #5</span></a>
<tr>
<td>4.8
<td><a href="../program/mandelbrot-fsharpcore-1.html"><span>F# .NET</span></a>
<td>15.70
<td class="message">99% 98% 98% 99%
<tr>
<td>4.8
<td><a href="../program/mandelbrot-gnat-3.html"><span><strong>Ada</strong> 2012 GNAT #3</span></a>
<td class="best">4.04
<td>35,632
<td>1819
<td>15.93
<td class="message">97% 100% 99% 99%
<tr>
<td>4.8
<td><a href="../program/mandelbrot-node-3.html"><span><strong>Node js</strong> #3</span></a>
<td class="best">4.04
<tr>
<td>4.9
<td><a href="../program/mandelbrot-java-2.html"><span><strong>Java</strong> #2</span></a>
<td><a href="../program/mandelbrot-csharpcore-5.html"><span>C# .NET #5</span></a>
<tr>
<td>5.0
<td><a href="../program/mandelbrot-gcc-9.html"><span>C gcc #9</span></a>
<td>16.13
<td class="message">98% 100% 96% 96%
<tr>
<td>5.0
<td><a href="../program/mandelbrot-sbcl-4.html"><span><strong>Lisp</strong> SBCL #4</span></a>
<td class="best">4.17
<td>46,584
<td>2447
<td>16.63
<td class="message">100% 100% 100% 100%
<tr>
<td>5.1
<td><a href="../program/mandelbrot-java-6.html"><span>Java #6</span></a>
<tr>
<td>5.3
<td><a href="../program/mandelbrot-java-4.html"><span>Java #4</span></a>
<td><a href="../program/mandelbrot-sbcl-1.html"><span>Lisp SBCL</span></a>
<tr>
<td>5.7
<td><a href="../program/mandelbrot-gpp-8.html"><span>C++ g++ #8</span></a>
<td>4.81
<td><a href="../program/mandelbrot-go-1.html"><span>Go</span></a>
<tr>
<td>7.8
<td><a href="../program/mandelbrot-fpascal-7.html"><span>Free Pascal #7</span></a>
<td><a href="../program/mandelbrot-ghc-2.html"><span>Haskell GHC #2</span></a>
<td>6.57
<td><a href="../program/mandelbrot-chapel-1.html"><span>Chapel</span></a>
<td class="message">100% 99% 99% 99%
<tr>
<td>8.1
<td><a href="../program/mandelbrot-go-2.html"><span>Go #2</span></a>
<td>6.79
<td class="message">100% 100% 100% 100%
<tr>
<td>8.2
<td><a href="../program/mandelbrot-go-6.html"><span>Go #6</span></a>
<td><a href="../program/mandelbrot-swift-5.html"><span>Swift #5</span></a>
<tr>
<td>8.8
<td><a href="../program/mandelbrot-java-3.html"><span>Java #3</span></a>
<td><a href="../program/mandelbrot-fpascal-6.html"><span>Free Pascal #6</span></a>
<td class="message">100% 100% 100% 100%
<tr>
<td>9.0
<td><a href="../program/mandelbrot-ocaml-1.html"><span><strong>OCaml</strong></span></a>
<td class="best">7.53
<td><a href="../program/mandelbrot-dartexe-3.html"><span><strong>Dart</strong> #3</span></a>
<td><a href="../program/mandelbrot-ifc-4.html"><span>Classic Fortran #4</span></a>
<tr>
<td>12
<td><a href="../program/mandelbrot-racket-4.html"><span><strong>Racket</strong> #4</span></a>
<td class="best">10.44
<tr>
<td>13
<td><a href="../program/mandelbrot-fpascal-2.html"><span>Free Pascal #2</span></a>
<td>10.97
<td>32,964
<td>825
<td>29.44
<td class="message">94% 44% 37% 94%
<tr>
<td>13
<td><a href="../program/mandelbrot-fpascal-1.html"><span>Free Pascal</span></a>
<td>11.01
<td>32,964
<td>825
<td>29.77
<td class="message">38% 94% 45% 94%
<tr>
<td>13
<td><a href="../program/mandelbrot-sbcl-3.html"><span>Lisp SBCL #3</span></a>
<tr>
<td>14
<td><a href="../program/mandelbrot-dartexe-2.html"><span>Dart #2</span></a>
<tr>
<td>16
<td><a href="../program/mandelbrot-gpp-5.html"><span>C++ g++ #5</span></a>
<td>13.36
<td class="message">0% 0% 100% 0%
<tr>
<td>21
<td><a href="../program/mandelbrot-gpp-2.html"><span>C++ g++ #2</span></a>
<td>17.46
<tr>
<td>28
<td><a href="../program/mandelbrot-php-3.html"><span><strong>PHP</strong> #3</span></a>
<td class="best">23.26
<td>142,252
<td>875
<td>92.82
<td class="message">100% 100% 100% 100%
<tr>
<td>30
<td><a href="../program/mandelbrot-gcc-2.html"><span>C gcc #2</span></a>
<td class="message">0% 0% 1% 100%
<tr>
<td>31
<td><a href="../program/mandelbrot-swift-1.html"><span>Swift</span></a>
<tr>
<td>32
<td><a href="../program/mandelbrot-fpascal-3.html"><span>Free Pascal #3</span></a>
<td>26.52
<td>8
<td>526
<tr>
<td>32
<td><a href="../program/mandelbrot-julia-1.html"><span>Julia</span></a>
<tr>
<td>33
<td><a href="../program/mandelbrot-java-1.html"><span>Java</span></a>
<tr>
<td>34
<td><a href="../program/mandelbrot-ocaml-6.html"><span>OCaml #6</span></a>
<tr>
<td>34
<td><a href="../program/mandelbrot-gnat-2.html"><span>Ada 2012 GNAT #2</span></a>
<tr>
<td>34
<td><a href="../program/mandelbrot-gpp-3.html"><span>C++ g++ #3</span></a>
<td><a href="../program/mandelbrot-racket-3.html"><span>Racket #3</span></a>
<tr>
<td>47
<td><a href="../program/mandelbrot-ghc-1.html"><span>Haskell GHC</span></a>
<td>39.72
<td>517,328
<td>621
<td>40.70
<td class="message">1% 13% 1% 87%
<td><a href="../program/mandelbrot-ifc-5.html"><span>Classic Fortran #5</span></a>
<tr>
<td>53
<td><a href="../program/mandelbrot-erlang-3.html"><span><strong>Erlang</strong> #3</span></a>
<td class="message">100% 100% 100% 100%
<tr>
<td>54
<td><a href="../program/mandelbrot-erlang-4.html"><span>Erlang #4</span></a>
<td class="message">100% 100% 100% 100%
<tr>
<td>55
<td><a href="../program/mandelbrot-erlang-2.html"><span>Erlang #2</span></a>
<td class="message">99% 99% 99% 99%
<tr>
<td>58
<td><a href="../program/mandelbrot-erlang-1.html"><span>Erlang</span></a>
<tr>
<td>59
<td><a href="../program/mandelbrot-racket-1.html"><span>Racket</span></a>
<tr>
<td>61
<td><a href="../program/mandelbrot-racket-2.html"><span>Racket #2</span></a>
<td>51.41
<td class="message">0% 0% 0% 100%
<tr>
<td>93
<td><a href="../program/mandelbrot-lua-6.html"><span><strong>Lua</strong> #6</span></a>
<td class="best">77.98
<td>19,652
<td>623
<td>281.69
<td class="message">100% 90% 85% 86%
<tr>
<td>104
<td><a href="../program/mandelbrot-php-1.html"><span>PHP</span></a>
<td>86.92
<td>13,396
<td>449
<td>87.41
<td class="message">0% 100% 0% 0%
<td><a href="../program/mandelbrot-vw-2.html"><span>VW <strong>Smalltalk</strong> #2</span></a>
<td><a href="../program/mandelbrot-python3-7.html"><span><strong>Python 3</strong> #7</span></a>
<td>11 min
<td class="message">99% 99% 99% 99%
<tr>
<td>215
<td><a href="../program/mandelbrot-ruby-5.html"><span><strong>Ruby</strong> #5</span></a>
<td class="best">180.18
<td>322,648
<td>970
<td>11 min
<td class="message">100% 100% 100% 100%
<td><a href="../program/mandelbrot-lua-3.html"><span>Lua #3</span></a>
<td><a href="../program/mandelbrot-lua-1.html"><span>Lua</span></a>
<td>233.47
<td class="message">0% 0% 0% 100%
<tr>
<td>313
<td><a href="../program/mandelbrot-lua-2.html"><span>Lua #2</span></a>
<td>262.15
<td>1,516
<td>367
<td>264.02
<td>324
<td><a href="../program/mandelbrot-ruby-2.html"><span>Ruby #2</span></a>
<td>271.60
<td>348,392
<td><a href="../program/mandelbrot-vw-1.html"><span>VW Smalltalk</span></a>
<td>5 min
<td><a href="../program/mandelbrot-perl-1.html"><span><strong>Perl</strong></span></a>
<td class="message">100% 100% 100% 100%
<tr>
<td>
<td><a href="../program/mandelbrot-ruby-4.html"><span>Ruby #4</span></a>
<td class="message">25% 25% 25% 25%
<tr>
<td>
<td><a href="../program/mandelbrot-ruby-3.html"><span>Ruby #3</span></a>
<tr>
<td>
<td><a href="../program/mandelbrot-mri-5.html"><span>Matz's <strong>Ruby</strong> #5</span></a>
<td class="best">32 min
<td>53,240
<td>970
<td>2h 10 min
<td class="message">100% 100% 100% 100%
<tr>
<td>
<td><a href="../program/mandelbrot-mri-2.html"><span>Matz's Ruby #2</span></a>
<td>39 min
<td>64,428
<td>880
<td>2h 37 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>39 min
<td>131,576
<td>918
<td>2h 32 min
<td class="message">96% 96% 95% 95%
<tr>
<td>
<td><a href="../program/mandelbrot-mri-3.html"><span>Matz's Ruby #3</span></a>
<td>2h 03 min
<td>3,208
<td>307
<td>2h 04 min
<td class="message">0% 0% 0% 100%
<tr>
<td>
<td><a href="../program/mandelbrot-gpp-0.html"><span>C++ g++</span></a>
<td class="message">Bad Output
<td>
<td>
<td>
<td>
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
<tr>
<td>
<td><a href="../program/mandelbrot-python3-5.html"><span>Python 3 #5</span></a>
<td class="message">Failed
<td>
<td>
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-python3-2.html"><span>Python 3 #2</span></a>
<td class="message">Timed Out
<td>
<td>
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-ruby-7.html"><span>Ruby #7</span></a>
<td class="message">Failed
<td>
<td>
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-ruby-6.html"><span>Ruby #6</span></a>
<td class="message">Failed
<td>
<td>
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-mri-7.html"><span>Matz's Ruby #7</span></a>
<td class="message">Failed
<td><a href="../program/mandelbrot-mri-4.html"><span>Matz's Ruby #4</span></a>
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
<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>
</table>
<nav>
<ul>
<li class="best">by secs
<li><a href="./mandelbrot-mem.html"><span>by mem</span></a>
<li><a href="./mandelbrot-gz.html"><span>by gz</span></a>
<li><a href="./mandelbrot-cpu.html"><span>by busy</span></a>
</ul>
</nav>
</section>
</article>
<footer>
<nav>
<ul>
<li><a href="../how-programs-are-measured.html"><span>How programs are measured</span></a>
</ul>
</nav>
</footer>