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.">
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.03 Benchmarks Game</a></h3>
<aside>
<p><a href="../description/mandelbrot.html#mandelbrot">description</a>
</aside>
<p>Then optimisations, multicore parallelism, <a class="external" href="https://cr.openjdk.java.net/~vlivanov/talks/2017_Vectorization_in_HotSpot_JVM.pdf">[pdf] vector parallelism.</a>
<p><a href="#intrinsics">Last</a> <a class="external" href="https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html">hand-written vector instructions</a> and "unsafe" programs.
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<th>
<th>source
<th class="best">secs
<th>mem
<th>gz
<th>
<th>
<tr>
<td>
<td><a href="../program/mandelbrot-icx-2.html"><span>Intel C #2</span></a>
<td>22.95
<td>1,220
<td>400
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-icc-2.html"><span>Classic C #2</span></a>
<td>24.73
<td>1,260
<td>400
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-gcc-2.html"><span>C gcc #2</span></a>
<td>25.28
<td>1,044
<td>400
<td>
<td>
<tr>
<td>
<td><a href="../program/mandelbrot-clang-2.html"><span>C clang #2</span></a>
<td>25.41
<td>1,040
<td>400
<td>
<td>
<tr>
<th colspan='7'>
<tr>
<th colspan='7'>
<tr>
<th colspan='7'>
<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>
<td><a href="../program/mandelbrot-rust-7.html"><span><strong>Rust</strong> #7</span></a>
<td class="best">0.91
<td><a href="../program/mandelbrot-rust-8.html"><span>Rust #8</span></a>
<td>3.64
<td class="message">100% 100% 99% 99%
<tr>
<td>1.2
<td><a href="../program/mandelbrot-gpp-0.html"><span><strong>C++</strong> g++ #0</span></a>
<td class="best">1.05
<td>34,796
<td>2739
<td>4.07
<td class="message">97% 98% 100% 96%
<td><a href="../program/mandelbrot-chapel-3.html"><span><strong>Chapel</strong> #3</span></a>
<td><a href="../program/mandelbrot-rust-6.html"><span>Rust #6</span></a>
<td><a href="../program/mandelbrot-rust-5.html"><span>Rust #5</span></a>
<td>1.08
<td>34,000
<td>719
<td><a href="../program/mandelbrot-rust-3.html"><span>Rust #3</span></a>
<td>1.36
<td>12,604
<td>1007
<td class="message">100% 100% 100% 100%
<tr>
<td>1.6
<td><a href="../program/mandelbrot-ifc-8.html"><span>Classic <strong>Fortran</strong> #8</span></a>
<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><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%
<td><a href="../program/mandelbrot-julia-5.html"><span>Julia #5</span></a>
<tr>
<td>1.8
<td><a href="../program/mandelbrot-gcc-8.html"><span><strong>C</strong> gcc #8</span></a>
<td class="best">1.63
<td>33,112
<td>782
<td><a href="../program/mandelbrot-julia-6.html"><span>Julia #6</span></a>
<td>2.03
<td>265,020
<td>562
<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><a href="../program/mandelbrot-ifc-6.html"><span>Classic Fortran #6</span></a>
<td><a href="../program/mandelbrot-gpp-9.html"><span>C++ g++ #9</span></a>
<td>3.50
<td><a href="../program/mandelbrot-go-4.html"><span><strong>Go</strong> #4</span></a>
<td class="best">3.73
<td><a href="../program/mandelbrot-go-3.html"><span>Go #3</span></a>
<td><a href="../program/mandelbrot-fpascal-8.html"><span>Free <strong>Pascal</strong> #8</span></a>
<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><a href="../program/mandelbrot-node-3.html"><span><strong>Node js</strong> #3</span></a>
<td>15.95
<td class="message">98% 98% 98% 100%
<td><a href="../program/mandelbrot-csharpcore-5.html"><span><strong>C#</strong> .NET #5</span></a>
<td class="best">4.11
<tr>
<td>4.5
<td><a href="../program/mandelbrot-java-2.html"><span><strong>Java</strong> #2</span></a>
<td class="best">4.13
<td>69,276
<td>796
<td>16.18
<td class="message">98% 98% 99% 99%
<td><a href="../program/mandelbrot-gcc-9.html"><span>C gcc #9</span></a>
<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><a href="../program/mandelbrot-java-6.html"><span>Java #6</span></a>
<td>16.89
<td class="message">98% 99% 99% 98%
<td><a href="../program/mandelbrot-dartexe-4.html"><span><strong>Dart</strong> #4</span></a>
<td class="best">4.33
<td>43,108
<td>16.91
<td class="message">98% 99% 100% 97%
<td><a href="../program/mandelbrot-java-4.html"><span>Java #4</span></a>
<td>16.13
<td class="message">88% 98% 95% 85%
<td><a href="../program/mandelbrot-sbcl-1.html"><span>Lisp SBCL</span></a>
<td><a href="../program/mandelbrot-gpp-8.html"><span>C++ g++ #8</span></a>
<td><a href="../program/mandelbrot-go-1.html"><span>Go</span></a>
<td>19.57
<td class="message">100% 100% 100% 100%
<td><a href="../program/mandelbrot-fpascal-7.html"><span>Free Pascal #7</span></a>
<td>7.2
<td><a href="../program/mandelbrot-ghc-2.html"><span><strong>Haskell</strong> GHC #2</span></a>
<td class="best">6.59
<td><a href="../program/mandelbrot-chapel-1.html"><span>Chapel</span></a>
<td><a href="../program/mandelbrot-go-2.html"><span>Go #2</span></a>
<td>6.79
<td><a href="../program/mandelbrot-go-6.html"><span>Go #6</span></a>
<td>8.0
<td><a href="../program/mandelbrot-swift-5.html"><span><strong>Swift</strong> #5</span></a>
<td class="best">7.30
<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><a href="../program/mandelbrot-ocaml-1.html"><span><strong>OCaml</strong></span></a>
<td class="best">7.53
<td><a href="../program/mandelbrot-ifc-4.html"><span>Classic Fortran #4</span></a>
<tr>
<td>12
<td><a href="../program/mandelbrot-fpascal-2.html"><span>Free Pascal #2</span></a>
<td>10.97
<td><a href="../program/mandelbrot-fpascal-1.html"><span>Free Pascal</span></a>
<td>11.01
<td>32,964
<td>825
<td><a href="../program/mandelbrot-sbcl-3.html"><span>Lisp SBCL #3</span></a>
<td><a href="../program/mandelbrot-dartexe-6.html"><span>Dart #6</span></a>
<td>31.60
<td class="message">35% 37% 100% 100%
<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>15.95
<td>18,672
<td>15.95
<td class="message">0% 2% 100% 0%
<td><a href="../program/mandelbrot-gpp-2.html"><span>C++ g++ #2</span></a>
<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><a href="../program/mandelbrot-gcc-2.html"><span>C gcc #2</span></a>
<td><a href="../program/mandelbrot-swift-1.html"><span>Swift</span></a>
<td><a href="../program/mandelbrot-fpascal-3.html"><span>Free Pascal #3</span></a>
<td>26.52
<td>8
<td>526
<td><a href="../program/mandelbrot-julia-1.html"><span>Julia</span></a>
<td><a href="../program/mandelbrot-java-1.html"><span>Java</span></a>
<tr>
<td>31
<td><a href="../program/mandelbrot-node-2.html"><span>Node js #2</span></a>
<td>28.18
<td class="message">0% 0% 0% 100%
<td><a href="../program/mandelbrot-ocaml-6.html"><span>OCaml #6</span></a>
<td><a href="../program/mandelbrot-gnat-2.html"><span>Ada 2012 GNAT #2</span></a>
<td><a href="../program/mandelbrot-gpp-3.html"><span>C++ g++ #3</span></a>
<tr>
<td>33
<td><a href="../program/mandelbrot-dartexe-2.html"><span>Dart #2</span></a>
<td>29.84
<td>18,352
<td>488
<td>29.84
<td class="message">100% 0% 0% 0%
<td><a href="../program/mandelbrot-ghc-1.html"><span>Haskell GHC</span></a>
<td><a href="../program/mandelbrot-ifc-5.html"><span>Classic Fortran #5</span></a>
<td><a href="../program/mandelbrot-erlang-3.html"><span><strong>Erlang</strong> #3</span></a>
<td><a href="../program/mandelbrot-erlang-4.html"><span>Erlang #4</span></a>
<td><a href="../program/mandelbrot-erlang-2.html"><span>Erlang #2</span></a>
<td><a href="../program/mandelbrot-erlang-1.html"><span>Erlang</span></a>
<td>54
<td><a href="../program/mandelbrot-racket-1.html"><span><strong>Racket</strong></span></a>
<td class="best">49.21
<td><a href="../program/mandelbrot-php-1.html"><span>PHP</span></a>
<td>86.92
<td>13,396
<td>449
<td><a href="../program/mandelbrot-lua-6.html"><span><strong>Lua</strong> #6</span></a>
<td class="best">87.98
<td>19,596
<td>623
<td><a href="../program/mandelbrot-vw-2.html"><span>VW <strong>Smalltalk</strong> #2</span></a>
<td><a href="../program/mandelbrot-node-1.html"><span>Node js</span></a>
<td>130.64
<td class="message">100% 3% 1% 2%
<td><a href="../program/mandelbrot-dartexe-1.html"><span>Dart</span></a>
<td>154.13
<td>17,240
<td>454
<td>154.09
<td class="message">76% 24% 2% 1%
<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><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><a href="../program/mandelbrot-ruby-2.html"><span>Ruby #2</span></a>
<td>271.60
<td>348,392
<td><a href="../program/mandelbrot-lua-2.html"><span>Lua #2</span></a>
<td>277.84
<td>1,420
<td>367
<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
<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
<tr>
<td>
<td><a href="../program/mandelbrot-mri-4.html"><span>Matz's Ruby #4</span></a>
<td>2h 08 min
<td>103,948
<td>857
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
<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>
<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 colspan='2'>
<th id="intrinsics" colspan="5"><strong>hand-written vector instructions | "unsafe"</strong>
<td><a href="../program/mandelbrot-gpp-4.html"><span>C++ g++ #4</span></a>
<td>0.84
<td>34,800
<td>3542
<td><a href="../program/mandelbrot-gpp-1.html"><span>C++ g++</span></a>
<td>0.89
<td><a href="../program/mandelbrot-gpp-6.html"><span>C++ g++ #6</span></a>
<td>0.98
<td>31,692
<td>1002
<td><a href="../program/mandelbrot-gcc-6.html"><span>C gcc #6</span></a>
<td>5.11
<td class="message">99% 99% 100% 100%
<td><a href="../program/mandelbrot-swift-7.html"><span>Swift #7</span></a>
<td>1.36
<td>41,876
<td>1140
<td><a href="../program/mandelbrot-swift-6.html"><span>Swift #6</span></a>
<td>1.38
<td>43,884
<td>1141
<td><a href="../program/mandelbrot-ghc-3.html"><span>Haskell GHC #3</span></a>
<td>1.53
<td>51,140
<td>1981
<td><a href="../program/mandelbrot-csharpcore-9.html"><span>C# .NET #9</span></a>
<td>3.11
<td>65,960
<td>816
<td class="message">97% 99% 98% 97%
<tr>
<td><a href="../program/mandelbrot-csharpcore-1.html"><span>C# .NET</span></a>
<td>3.11
<td>66,112
<td>1974
<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>
<td><a href="../program/mandelbrot-gcc-1.html"><span>C gcc</span></a>
<td class="message">100% 100% 100% 100%
<tr>
<td><a href="../program/mandelbrot-gcc-7.html"><span>C gcc #7</span></a>
<td><a href="../program/mandelbrot-gcc-3.html"><span>C gcc #3</span></a>
<td>3.52
<td><a href="../program/mandelbrot-fsharpcore-6.html"><span>F# .NET #6</span></a>
<td>3.72
<td>65,928
<td>933
<td class="message">98% 99% 98% 98%
<tr>
<td><a href="../program/mandelbrot-fsharpcore-5.html"><span>F# .NET #5</span></a>
<td>3.96
<td>66,084
<td>897
<td class="message">98% 99% 98% 98%
<tr>
<td><a href="../program/mandelbrot-fsharpcore-1.html"><span>F# .NET</span></a>
<td>3.99
<td>66,172
<td>877
<td><a href="../program/mandelbrot-racket-4.html"><span>Racket #4</span></a>
<td>10.44
<td>126,208
<td>801