With dual and quad-core CPUs the norm these days, I felt the time had come to finally update the QuickMAN Mandelbrot generator to take advantage of them. Massive performance increases seemed possible with only a little bit of effort.
That's how it turned out- performance is now pretty much proportional to the number of CPU cores in your machine. On a dual-CPU Opteron 280 system (four total cores), the speedup is about 3.9x compared to previous versions...
A dual AMD FX-74 system would be in stupid-fast territory, with an estimated performance of 4.4 billion iterations per second, or close to 40 Gigaflops. Even my modest Pentium D 820 system is now at 1.7 billion. My main development machine, an Athlon 4000+ that formerly seemed so fast, is now a laggard because of its single core. Time to get a new PC.
This version of QuickMAN supports up to 32 threads. You can run as many threads as you want, but there's no point in having more threads than CPU cores- things won't get any faster. If for some reason you need more than 32 threads (for instance, if you have some kind of parallel supercomputer system) you can just change a constant in the code and recompile. However, I've noticed that the speedup factor starts to drop off somewhere between 8 and 16 threads. It just gets hard to divide up the work evenly enough to get good efficiency.
One consequence of multicore support is that QuickMAN now runs at wildly different speeds on different systems. There's no longer any one set of settings that's good for all. So, I added sliders for zoom and pan rate control- these allow you to set any rate from molasses-slow to faster than you'd probably want.
To my surprise, I found I really liked the super-slow settings. There's something mesmerizing about watching a Mandelbrot image creep across the screen at a few centimeters per second. To facilitate these sorts of displays, there are now logfile commands that allow you to set auto-panning or auto-zooming, among other things. When you load the image, it starts moving automatically.
This release includes an example logfile (auto_panzoom.log) that demonstrates these features. Take some time to try it out; kick back and just watch for awhile. Most of the pan sequences remain interesting for several minutes. If you do find any boring stretches, you can just crank up the pan rate slider to speed over them. If your system allows it (and it probably will), maximize your window for best effect...
A new "pan lock" function allows you to pan over the image in a hands-free mode. To try it out, press and release the Shift key while panning with the arrow keys. The image will keep moving in its current direction. You can then press the arrow keys again to adjust the direction, or press Shift again to bring things to a halt.
There is finally a "quickman.cfg" file that the program loads on startup. It allows you to set default settings such as window size, pan and zoom rates, color for the maximum-iterations points, and even some algorithm tuning values. You can do all the same stuff on a per-image basis in logfiles. In fact, "quickman.cfg" is just another logfile.
I removed the Buddhabrot function that was in v0.95. It wasn't complete, and was adding a lot of complexity to the code. I may put it back in again later when it's in a better state.
One little rant to wrap things up... one thing I've learned while working on this project is that modern bloatware operating systems and software apps do a great job of masking the true speed of today's CPUs. Whenever an app I'm using takes few seconds to do something simple, I think "wow, that was about 20 billion clock cycles." I wonder what kind of intensive computations the apps are doing with those cycles. The little half-second pauses (some 2 - 5 billion cycles) that seem to happen everywhere are inexcusable too. We really shouldn't tolerate this...
Anyway, enjoy this new and improved QuickMAN. I've been having a blast working on it.
Note: QuickMAN no longer works under Windows 98. If you absolutely must run it on a Win98 system, send me an email and I can make you a custom version (it will be somewhat slower than the normal one).