Best language for generating Mandelbrot Set images?

893 views Asked by At

I tried coding something in c#, which generates a mandelbrot set image (with smooth coloring), and it worked but produced very slow, probably because c# isn't the best language for it. What woould be the best language to generate lots of images in the shortest time?

1

There are 1 answers

1
Searles On

The programming language does not matter. The fastest is to do the calculation on the GPU using eg CUDA or OpenCL.

Just do a search for Mandelbrot Set Realtime GPU. Some examples that I found:

(Disclaimer, none of them is mine, but I use Renderscript for a similar purpose in Android)

Side note 1: You can also implement a fractal renderer directly in C# and it will be equally fast as any other in C or C#, but you should not create new objects on the heap for each calculation step (or use a library for complex numbers that does exactly this). Either use double-variables or reuse existing objects.

Side note 2: Using arbitrary precision will always be slow.