/mobile Handheld Friendly website

 mandelbrot benchmark N=16,000

Each chart bar shows how many times more Memory, one ↓ mandelbrot program used, compared to the program that used least Memory.

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.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Pascal Free Pascal #3 78.7478.768530  0% 0% 0% 100%
41C gcc #2 49.9449.96328400  0% 0% 0% 100%
85Rust 101.23101.26676633  0% 0% 1% 100%
103Lua #2 13 min13 min820367  0% 0% 0% 100%
111C++ g++ #3 183.48183.64884414  0% 1% 1% 100%
121Ada 2005 GNAT #2 58.0658.09968572  0% 0% 0% 100%
131Lua 13 min13 min1,044353  0% 0% 0% 100%
206OCaml #6 85.9385.961,648444  0% 0% 0% 100%
390PHP 19 min19 min3,120443  1% 0% 0% 100%
467OCaml 150.52150.713,732710  0% 0% 0% 100%
608C CINT #2 1h 32 min1h 32 min4,860400  0% 0% 0% 100%
661Ruby #3 1h 04 min1h 04 min5,288307  0% 1% 1% 100%
1,864C# Mono #2 57.3057.3114,912484  1% 0% 0% 100%
1,878Racket 120.25120.3415,024517  1% 0% 0% 100%
1,951Java  44.1044.2115,604665  1% 1% 0% 100%
2,003Racket #2 95.4395.4616,020585  0% 0% 1% 100%
2,204Racket #3 76.7676.7917,632797  0% 0% 1% 100%
2,283F# Mono #2 188.60188.6518,2641043  1% 1% 1% 100%
2,325Scala #2 52.5052.5218,600454  0% 1% 0% 100%
2,777Smalltalk VisualWorks #2 12 min12 min22,216467  0% 0% 0% 100%
3,054Lua #6 13 min13 min24,428623  0% 0% 0% 100%
3,498Python 3 #5 38 min38 min27,984449  1% 1% 1% 100%
3,716Ada 2005 GNAT #3 24.8024.8229,7241805  0% 1% 1% 100%
3,733C gcc 23.4223.4329,860822  0% 1% 0% 100%
3,733C gcc #6 23.4623.4729,864879  0% 1% 1% 100%
3,805C gcc #9 29.9429.9630,440694  1% 1% 1% 100%
3,805C gcc #4 22.6022.6130,440799  0% 0% 1% 100%
3,867Pascal Free Pascal #5 135.76135.8030,936829  0% 0% 0% 100%
3,900Pascal Free Pascal #4 240.09240.1531,200748  0% 0% 0% 100%
3,921Go #6 48.6648.6831,364700  0% 1% 0% 100%
3,968C gcc #3 22.7622.7731,740763  1% 0% 1% 100%
3,970C++ g++ #6 27.9427.9531,7601035  0% 0% 1% 100%
3,970C gcc #7 22.8322.8331,760994  0% 1% 1% 100%
3,987Pascal Free Pascal #2 83.7083.7231,896817  0% 0% 0% 100%
3,987Pascal Free Pascal 83.7183.7431,896820  0% 0% 0% 100%
4,005C++ g++ #2 40.1240.1432,036687  0% 0% 1% 100%
4,005C++ g++ #5 35.0635.0732,036590  0% 0% 1% 100%
4,011C++ g++ #8 31.2431.2532,088742  0% 1% 1% 100%
4,011C++ g++ #7 23.4523.4632,0881017  0% 0% 1% 100%
4,011C++ g++ #9 30.8830.8932,088726  0% 0% 1% 100%
4,076Fortran Intel #5 56.4556.4632,604508  0% 0% 0% 100%
4,373Haskell GHC #2 47.7947.8134,980782  0% 1% 0% 100%
4,396Lisp SBCL 66.9066.9235,1642459  0% 0% 1% 100%
4,426Lisp SBCL #3 75.6275.6535,404888  0% 0% 1% 100%
5,980Java  #3 41.5641.5747,836903  1% 1% 0% 100%
6,129C# Mono #6 31.2331.2449,032986  1% 1% 2% 100%
6,162C# Mono #3 45.2145.2349,292701  0% 0% 0% 100%
6,173C# Mono 45.9645.9749,384798  0% 0% 0% 100%
6,217Scala 49.0149.0349,732724  1% 0% 0% 100%
6,226C# Mono #4 31.9431.9649,808872  0% 1% 1% 100%
6,266F# Mono #3 45.5845.5950,124800  0% 0% 0% 100%
6,389Racket #4 78.2378.2651,108796  1% 0% 0% 100%
6,525Python 3 #2 28 min28 min52,196777  1% 1% 1% 100%
6,802F# Mono #4 35.9035.9254,412869  0% 0% 1% 100%
7,234Fortran Intel #4 47.3447.3557,868611  0% 0% 0% 100%
8,760Java  #2 27.0027.0170,076796  0% 0% 1% 100%
8,805Java  #6 29.3829.4070,440802  1% 1% 0% 100%
10,549Ruby #2 1h 13 min1h 13 min84,388925  0% 1% 0% 100%
10,896Clojure #5 55.9956.0187,1681069  0% 1% 1% 100%
13,490Clojure #6 58.0958.11107,9161069  0% 1% 1% 100%
13,551PHP #3 20 min20 min108,408863  0% 0% 0% 100%
17,495Clojure #7 34.7234.74139,9561195  0% 2% 2% 100%
17,927Dart 52.6652.69143,412901  1% 0% 0% 100%
19,367Scala #4 28.1528.16154,936786  0% 1% 1% 100%
77,339Ruby JRuby #3 19 min19 min618,712307  0% 1% 1% 100%
79,364Erlang HiPE 6 min6 min634,912534  0% 0% 0% 100%
85,789Ruby JRuby #2 27 min27 min686,312925  0% 1% 1% 100%
Fortran Intel Bad Output485
Fortran Intel #3 Bad Output754
Fortran Intel #2 Bad Output813
JavaScript V8 #2 Bad Output353
Perl Failed579
Python 3 #3 Failed304
Scala #3 Failed796
"wrong" (different) algorithm / less comparable programs
2,021C gcc #5 7.527.5216,1641026
3,681C++ g++ 10.4710.4829,4481239
3,805C gcc #8 16.7216.7330,440859
5,769Python 3 #6 157.08157.4746,1521380

 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