enthought/distarray — pull request #515 by markkness (2014-07-11 19:27:36+00:00)
Title: Julia set performance example

This PR provides a sample Julia set calculation that is designed to test the performance effects of various array distributions. It is composed of two scripts, `julia_example.py`, which does all the calculation work, and writes out the timing results to standard output, and `plot_results.py`, which takes the output of the first script and generates a nice plot.

I'll do more timings with this, on other machines, but this should be ready for some review.

`julia_example.py` : This is normally run with no command line arguments, one would edit the main block of the script to control what sorts of parameters to use. You can specify a list of desired distributions, number of engines to use, resolution of the complex plane, constant `c` values, and a number of times to repeat the calculations and timings. You can also adjust to calculate the Mandelbrot set instead of the Julia set.

If you do specify command line arguments, they are assumed to be the real and imaginary parts of the complex constant `c`, and then a plot is made with the results, which is nice to look at. If the script is coded to calculate the Mandelbrot set, the `c` value is irrelevant.

`plot_results.py` : This script reads the output of the first, and creates a plot of the timings. When there are multiple runs with the same parameters, the shortest time is used, consistent with the behavior of `timeit`.
(You can also change a value in the script, which would then plot all the times, not just the minimum, and this adds some jitter to make a less crowded plot. But the minimum time is the normal use.)

These scripts are in the same folder as the existing Julia set example, which is basically left alone by this PR.