A set of optimizations of a Mandelbrot Set for x86-64 generator that gives ~8x speed improvement over the basic loop. This is designed to go with https://orange-kiwi.com/optimization-example-mandelbrot-part-1/
NOTE: this is example code, rather than a full library.
This currently only builds under Linux. but would be easy to port to other operating systems. It also uses C++, but this would be quite portable to other languages.
To build, use the command:
make
There are two build targets:
-
mandelbrot_speed_tests runs the speed tests.
-
mandelbrot_render_images generates the images used by the web page.
These are the files setting up the class
This is the fastest version of the Mandelbrot Set generator (so far)
These are various container rendering methods.
A state engine to go with Mandelbrot_render.h
The main for rendering images.
Some code for creating a png, adapted from various sources. Some of this uses the X11 license.
The main for the speed tests.
Portions of the speed test need to be build with -ffast-math. They have been moved from main_speed_tests.cpp to here.
This is the point generation function built without -ffast-math
These are various point generation functions built with -ffast-math.
Outer loops for Mandelbrot_point_simple.cpp and Mandelbrot_functions_fast.cpp