/mobile Handheld Friendly website

 mandelbrot benchmark N=16,000

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

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.

    sortsortsort 
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Ruby JRuby #3 18 min18 min629,772307  24% 31% 29% 19%
1.0Ruby #3 31 min31 min7,508307  30% 29% 18% 25%
1.3C gcc #2 47.1947.21408400  1% 0% 0% 100%
1.3C++ g++ #3 72.2172.231,076414  0% 0% 0% 100%
1.4Hack 1h 11 min1h 11 min86,296441  0% 100% 0% 0%
1.4PHP 21 min21 min4,256443  28% 17% 33% 24%
1.4OCaml #6 56.3456.363,128444  93% 0% 0% 7%
1.5Python 3 #5 33 min8 min40,728449  100% 100% 100% 100%
1.5Scala #2 51.8951.8023,796454  1% 1% 4% 97%
1.6C# Mono #2 55.0655.0715,596484  0% 1% 1% 100%
1.7Fortran Intel #5 56.7856.8032,732508  0% 0% 100% 0%
1.7Racket 102.45102.5917,788517  1% 83% 18% 1%
1.7Pascal Free Pascal #3 75.4175.428530  96% 0% 0% 4%
1.7Erlang 32 min8 min1,252,976534  98% 98% 98% 98%
1.7Erlang HiPE 274.0377.841,269,512534  88% 96% 85% 84%
1.9Ada 2005 GNAT #2 57.2057.221,244572  0% 1% 100% 0%
1.9Perl 55 min13 min41,196579  100% 100% 100% 100%
1.9Racket #2 88.0488.0320,252585  0% 1% 100% 0%
1.9C++ g++ #5 37.6937.7032,232590  0% 1% 100% 0%
2.0Fortran Intel #4 48.4318.4157,492611  96% 34% 95% 41%
2.1Rust 52.2252.23780633  1% 100% 0% 0%
2.2Java  42.9842.9519,576665  1% 1% 0% 99%
2.2C++ g++ #2 39.4439.4532,228687  0% 0% 0% 100%
2.3C gcc #9 19.525.0631,280694  100% 96% 96% 96%
2.3Go #6 46.3511.6030,056700  100% 100% 100% 100%
2.3C# Mono #3 45.2411.4450,068701  99% 99% 99% 99%
2.3OCaml 55.8814.046,548710  100% 100% 100% 100%
2.4Scala 48.1912.2254,428724  98% 98% 99% 100%
2.4C++ g++ #9 33.108.6132,288726  100% 95% 95% 95%
2.4C++ g++ #8 33.2212.2832,292742  36% 100% 36% 100%
2.4Pascal Free Pascal #4 66.6116.6729,544748  100% 100% 100% 100%
2.5C gcc #3 24.106.0631,816763  99% 100% 100% 100%
2.5Python 3 #2 29 min7 min10,556777  90% 100% 90% 90%
2.5Haskell GHC #2 45.8111.4937,116782  100% 100% 100% 100%
2.6Scala #4 28.567.42285,580786  96% 96% 98% 96%
2.6Racket #4 71.6118.1160,436796  99% 99% 100% 99%
2.6Java  #2 27.847.1162,344796  98% 97% 98% 100%
2.6Racket #3 73.8573.8121,040797  5% 1% 95% 0%
2.6C# Mono 46.0311.6449,840798  99% 99% 100% 99%
2.6C gcc #4 24.186.0627,500799  100% 100% 100% 100%
2.6F# Mono #3 45.4511.5351,560800  98% 100% 98% 98%
2.6Java  #6 28.087.1762,432802  98% 97% 98% 99%
2.7Pascal Free Pascal 80.4330.1931,976820  95% 95% 41% 36%
2.7C gcc 24.636.1725,844822  100% 100% 100% 100%
2.7Pascal Free Pascal #5 134.9433.8429,872829  100% 100% 100% 100%
2.8PHP #3 21 min5 min115,808863  100% 100% 100% 100%
2.8F# Mono #4 36.819.4456,552869  97% 97% 98% 98%
2.8C# Mono #4 32.228.1850,892872  98% 99% 98% 99%
2.9C gcc #6 24.626.1725,532879  100% 100% 100% 100%
2.9Lisp SBCL #3 46.6818.1936,480888  33% 92% 93% 40%
2.9Dart 56.9420.92183,204901  98% 38% 99% 38%
2.9Java  #3 50.8812.8862,416903  99% 99% 100% 98%
3.0Ruby #2 35 min8 min182,724925  100% 100% 100% 100%
3.0Ruby JRuby #2 2h 05 min31 min712,676925  99% 99% 99% 99%
3.2C# Mono #6 32.248.1950,972986  98% 99% 99% 98%
3.2C gcc #7 24.266.1031,836994  100% 100% 100% 100%
3.3C++ g++ #7 23.785.9732,2881017  99% 100% 100% 99%
3.4C++ g++ #6 28.667.2031,8401035  100% 100% 100% 100%
3.4F# Mono #2 47.8412.9320,3121043  90% 99% 86% 94%
3.5Clojure #5 62.6753.54148,8361069  9% 44% 44% 22%
3.5Clojure #6 64.1318.04138,5161069  92% 81% 93% 90%
5.9Ada 2005 GNAT #3 22.755.7930,2841805  97% 98% 100% 99%
8.0Lisp SBCL 28.407.7136,2082459  100% 84% 88% 97%
Fortran Intel #2 Bad Output813
Fortran Intel #3 Bad Output754
Fortran Intel Bad Output485
Hack #3 Failed864
Pascal Free Pascal #2 Make Error817
Python 3 #3 Failed304
Scala #3 Failed796
"wrong" (different) algorithm / less comparable programs
2.8C gcc #8 16.034.0228,660859
3.3C gcc #5 7.301.8515,9721026
4.0C++ g++ 10.672.6825,5681239
4.5Python 3 #6 120.6630.9952,1241380

 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