/mobile Handheld Friendly website

 mandelbrot benchmark N=16,000

Each chart bar shows how many times slower, one ↓ mandelbrot program was, compared to the fastest program.

These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.

Column × shows how many times more each program used compared to the benchmark program that used least.

    sort sortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Fortran Intel #6 13.9813.9931,280967  0% 0% 1% 100%
1.4C++ g++ #9 19.5819.6032,072726  0% 0% 0% 100%
1.4C++ g++ #8 20.2120.2232,076742  0% 1% 0% 100%
1.7C gcc #4 23.2223.2330,432799  0% 0% 0% 100%
1.7C gcc #3 23.4423.4531,736763  0% 0% 0% 100%
1.7C++ g++ #5 23.5623.5732,024590  0% 0% 0% 100%
1.7C gcc #6 23.6923.7128,540879  0% 0% 0% 100%
1.7C++ g++ #7 23.7023.7132,0761017  0% 0% 0% 100%
1.7C gcc 23.9623.9829,592822  0% 0% 0% 100%
1.8ATS 24.6524.6630,1482148  0% 0% 0% 100%
1.8Ada 2005 GNAT #3 24.8124.8429,7201805  0% 1% 1% 100%
1.9ATS #2 26.1726.183201455  0% 0% 0% 100%
1.9Java 7  #2 26.9226.9367,880796  0% 0% 0% 100%
2.0C++ g++ #6 27.3027.3231,7561035  0% 0% 0% 100%
2.0Scala #4 28.0128.03195,456786  0% 0% 0% 100%
2.1Java 7  #6 29.2429.2567,664802  0% 1% 0% 100%
2.5C++ g++ #2 35.4835.5032,024687  0% 0% 0% 100%
3.0Java 7  #3 42.1042.1167,876903  1% 0% 0% 100%
3.1Java 7  42.8342.8414,392665  1% 0% 0% 100%
3.1Haskell GHC #2 43.9643.9835,364782  0% 0% 0% 100%
3.2C# Mono #3 45.2545.2647,676701  0% 0% 0% 100%
3.3C# Mono 45.8845.8947,552798  0% 0% 0% 100%
3.4Fortran Intel #4 47.3447.3557,868611  0% 0% 0% 100%
3.4F# Mono #3 47.5647.5748,464800  0% 0% 0% 100%
3.4Scala 48.2248.2449,932724  0% 0% 0% 100%
3.5Go #6 48.6648.6831,556700  0% 0% 0% 100%
3.7C gcc #2 51.0451.07324400  0% 0% 0% 100%
4.0Scala #2 56.0156.0317,792454  0% 0% 0% 100%
4.0Fortran Intel #5 56.4556.4632,604508  0% 0% 0% 100%
4.1C# Mono #2 57.4457.4513,868484  1% 0% 0% 100%
4.2Ada 2005 GNAT #2 58.0758.10964572  0% 0% 0% 100%
4.5Clojure #5 63.5763.60108,5121069  0% 0% 0% 100%
4.8Lisp SBCL 67.1267.1436,0042459  0% 0% 0% 100%
4.8Clojure #6 67.4067.43114,5161069  2% 2% 1% 100%
5.4Lisp SBCL #3 75.5775.5935,812888  0% 0% 0% 100%
5.6Racket #4 78.2778.3050,748796  0% 0% 0% 100%
5.6Pascal Free Pascal #3 78.7478.768530  0% 0% 0% 100%
5.7Racket #3 80.0280.0516,488797  0% 0% 0% 100%
6.0Pascal Free Pascal #2 83.7083.7231,896817  0% 0% 0% 100%
6.0Pascal Free Pascal 83.7183.7431,896820  0% 0% 0% 100%
6.1OCaml 85.7185.863,984710  0% 0% 0% 100%
6.4Dart 88.8788.90201,728809  0% 0% 0% 100%
6.9Racket #2 96.2896.3215,260585  0% 0% 0% 100%
7.7Racket 107.46107.5014,908517  0% 0% 0% 100%
11OCaml #6 150.49150.531,636444  0% 0% 0% 100%
13F# Mono #2 188.54188.6016,8601043  1% 0% 0% 100%
16C++ g++ #3 221.82222.07868414  0% 1% 0% 100%
17Pascal Free Pascal #4 240.09240.1531,200748  0% 0% 0% 100%
27Erlang HiPE 6 min6 min634,912534  0% 0% 0% 100%
54Smalltalk VisualWorks #2 12 min12 min22,216467  0% 0% 0% 100%
56Lua 13 min13 min1,044353  0% 0% 0% 100%
58Lua #6 13 min13 min24,428623  0% 0% 0% 100%
59Lua #2 13 min13 min820367  0% 0% 0% 100%
71Ruby JRuby #3 16 min16 min584,584307  0% 0% 1% 100%
99PHP #3 23 min23 min108,044863  0% 0% 0% 100%
129Ruby JRuby #2 30 min30 min690,392925  0% 0% 0% 100%
141Python 3 #2 30 min32 min6,748777  1% 0% 0% 100%
187PHP 43 min43 min3,072443  1% 0% 0% 100%
201Python 3 #5 41 min46 min6,496449  1% 0% 0% 100%
225Perl #3 52 min52 min1,992370  0% 1% 0% 100%
344Ruby 2.0 #3 1h 20 min1h 20 min4,864307  0% 0% 0% 100%
398C CINT #2 1h 32 min1h 32 min4,860400  0% 0% 0% 100%
449Ruby 2.0 #2 1h 44 min1h 44 min64,480925  0% 0% 0% 100%
Fortran Intel Bad Output485
Fortran Intel #3 Bad Output754
Fortran Intel #2 Bad Output813
JavaScript V8 #2 Bad Output353
Perl #4 Failed592
Python 3 #3 Failed304
Scala #3 Failed796
"wrong" (different) algorithm / less comparable programs
0.5C gcc #5 7.107.1115,8961026
0.9C++ g++ 12.3212.3329,1721239
10Python 3 #6 139.47139.5945,5761380

 mandelbrot benchmark : Generate Mandelbrot set portable bitmap file

cmp program output N = 200 with this 5KB output file to check your program is correct before contributing.

We are trying to show the performance of various programming language implementations - so we ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.

Mandlebrot output N=200,converted to PNG

Each program should plot the Mandelbrot set [-1.5-i,0.5+i] on an N-by-N bitmap. Write output byte-by-byte in portable bitmap format.

For more information see Eric W. Weisstein, "Mandelbrot Set." From MathWorld--A Wolfram Web Resource.
http://mathworld.wolfram.com/MandelbrotSet.html

Thanks to Greg Buchholz for this benchmark.

Revised BSD license

  Home   Conclusions   License   Play