/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 14.213.6127,032967  99% 99% 99% 99%
1.4C++ g++ #9 19.645.1032,076726  95% 95% 95% 100%
1.6C gcc #4 23.255.8327,596799  100% 100% 100% 100%
1.6C gcc #3 23.455.9031,736763  99% 99% 100% 99%
1.6C gcc #6 23.725.9525,484879  100% 100% 100% 100%
1.7C++ g++ #7 23.735.9732,0761017  99% 99% 99% 100%
1.7C gcc 23.976.0127,168822  100% 100% 100% 100%
1.7ATS 24.656.1828,3282148  100% 100% 100% 100%
1.7Ada 2005 GNAT #3 24.846.2633,2761805  100% 100% 99% 99%
1.9C++ g++ #6 27.336.8731,7561035  100% 99% 99% 100%
1.9Java 7  #2 27.146.9067,612796  98% 98% 99% 99%
2.0Scala #4 28.227.39221,728786  95% 95% 99% 95%
2.1C++ g++ #8 20.267.4532,076742  37% 99% 99% 37%
2.1Java 7  #6 29.567.5567,600802  97% 98% 98% 99%
3.0Java 7  #3 42.2910.7268,128903  99% 98% 100% 99%
3.1Haskell GHC #2 43.9411.0233,928782  100% 100% 100% 100%
3.4C# Mono #3 45.9412.1549,644701  93% 93% 93% 100%
3.4Go #6 48.7212.2929,708700  100% 100% 100% 100%
3.4C# Mono 46.6212.3249,696798  93% 93% 93% 99%
3.5F# Mono #3 48.2112.7150,340800  93% 100% 93% 93%
3.6Scala 50.8812.9149,664724  98% 98% 100% 98%
4.1F# Mono #2 52.4814.7519,0921043  92% 93% 89% 83%
4.7Lisp SBCL 67.1316.9535,3002459  99% 99% 99% 99%
5.1Fortran Intel #4 48.7318.4160,388611  96% 34% 96% 40%
5.1Clojure #6 67.3718.42106,6241069  95% 94% 90% 88%
5.5Racket #4 78.3919.8150,784796  99% 99% 100% 99%
6.0OCaml 85.7621.553,988710  100% 100% 100% 100%
6.5C++ g++ #5 23.5723.5832,024590  62% 3% 11% 68%
7.3ATS #2 26.1926.203201455  0% 0% 100% 0%
8.1Lisp SBCL #3 75.5929.1035,816888  63% 80% 47% 70%
8.8Pascal Free Pascal #2 83.7131.6031,900817  95% 35% 48% 88%
8.8Pascal Free Pascal 83.7031.6431,900820  94% 41% 95% 36%
9.2Dart 88.9133.22201,932809  99% 35% 99% 34%
9.9C++ g++ #2 35.5035.5232,024687  87% 0% 0% 13%
12Java 7  42.9442.9014,240665  0% 0% 100% 0%
14C gcc #2 51.0551.07324400  90% 0% 0% 10%
15Scala #2 52.4852.4117,888454  0% 0% 100% 0%
16Clojure #5 63.7156.14109,6241069  5% 97% 6% 6%
16Fortran Intel #5 56.8956.9132,608508  0% 0% 100% 0%
16C# Mono #2 57.3757.3916,028484  100% 0% 0% 0%
16Ada 2005 GNAT #2 58.1058.12964572  99% 0% 0% 1%
17Pascal Free Pascal #4 240.0760.1530,340748  100% 100% 100% 100%
21Racket #3 76.5876.5717,300797  0% 0% 100% 0%
22Pascal Free Pascal #3 78.7478.768530  95% 0% 0% 6%
27Racket #2 96.1096.1015,252585  0% 19% 81% 0%
30Erlang HiPE 6 min107.28662,920534  94% 92% 91% 92%
30Racket 107.40107.3814,912517  0% 0% 100% 0%
42OCaml #6 150.53150.591,632444  0% 0% 100% 1%
50C++ g++ #3 178.57178.72868414  43% 42% 12% 5%
91PHP #3 21 min5 min108,068863  100% 100% 100% 100%
122Python 3 #2 29 min7 min6,772777  100% 100% 100% 100%
197Python 3 #5 47 min11 min25,748449  100% 100% 100% 100%
222Ruby JRuby #2 47 min13 min698,732925  91% 95% 89% 89%
230Perl #4 54 min13 min79,344592  99% 98% 99% 98%
275Ruby JRuby #3 16 min16 min586,208307  49% 45% 7% 2%
391PHP 23 min23 min3,076443  16% 0% 0% 85%
429Ruby 2.0 #2 1h 42 min25 min66,512925  100% 100% 100% 99%
919Perl #3 55 min55 min2,284370  98% 1% 1% 1%
1,349Ruby 2.0 #3 1h 21 min1h 21 min4,860307  17% 81% 2% 1%
Fortran Intel Bad Output485
Fortran Intel #3 Bad Output754
Fortran Intel #2 Bad Output813
Python 3 #3 Failed304
Scala #3 Failed796
"wrong" (different) algorithm / less comparable programs
0.5C gcc #5 7.121.8015,8961026
0.9C++ g++ 12.503.1425,2161239
9.9Python 3 #6 138.3135.6145,5801380

 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