Skip to content

Language Shootout

A user-supported site Fastest, Shortest, Simplest

Benchmarks

Mandelbrot

Background

MathWorld: Mandelbrot Set.

Thanks to Greg Buchholz for suggesting this task.

How to implement

We ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.

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.

Verification: Use cmp to compare program output N=200 with the reference output.

Use a larger command line argument (16000) to check program performance.

Times are wall-clock milliseconds, with this implementation’s hello-world startup time subtracted. gz is the source in bytes with comments removed and gzipped. style is the idiomatic-code score. Click a heading to sort.

# source ms cpu ms mem KB gz style by
1 Swift #1 14,921.4 14,912.8 8,868 408 ★★★☆☆ sysop-