4 ms·
Like many others here I am sure, I was quite obsessed with fractals way back, fractint was awesome, and I did spend quite some time writing an integer math frac
by tetraodonpuffer 11y ago
Like many others here I am sure, I was quite obsessed with fractals way back, fractint was awesome, and I did spend quite some time writing an integer math fractal generator in assembly on my AtariST back then (I remember enjoying just how many registers I could use on M68k compared to my friends that were working with x86 and how it made things so much simpler, I really enjoyed M68k assembly)
When I first found XaoS in later years it was amazing, thinking that you could actually zoom in real time (!) and it's nice to see that some programs are still around allowing you to do fractals.
It would be interesting to know which would be the fastest way to calculate them nowadays, if on the CPU or on the GPU (I think in both cases one would have to roll their own high precision math for deep zooms)
(edit) found a post on the Fractal Extreme blog discussing GPU math, it is from 2012 though, I wonder if the intervening 4 years have changed the author's opinion on this.
https://randomascii.wordpress.com/2012/03/28/fractal-and-crypto-performance/ https://randomascii.wordpress.com/2012/03/28/fractal-and-cry...
- RamshackleJ 11y agoI think it is no question that GPU's handle fractal renders significantly better than the CPU does. If you are rendering a fractal properly each pixel can be computed separately from all others, a problem that is perfect for the massive parallel multiprocessor. I would even go far to say that with current GPU hardware rendering fractals is "solved" in terms of realtime capability. see: https://www.shadertoy.com/results?query=fractal https://www.shadertoy.com/results?query=fractal I think fractals are still awesome despite being pretty simple these days. They are an excellent gateway into doing programing on the GPU. I think they are exactly the type awe inspiring programs that younger students should be shown.
- deleted 11y ago[deleted]
- ghusbands 11y agoA lack of arbitrary precision makes GPUs unsuitable for deeper Mandelbrot zoom levels, so "solved" is overstating it.
- RamshackleJ 11y agohow many levels are you talking about? I agree the worse floating point precision of GPUs puts them at a disadvantage but they still do better for massively parallel problems like fractal renders. (http://www.bealto.com/mp-mandelbrot_benchmarks.html http://www.bealto.com/mp-mandelbrot_benchmarks.html)
- ctdonath 11y agoThe more interesting zooms magnify something like 10^256 times.
- brucedawson 11y agoGPUs are happiest when doing float precision, which is 24 bits. Most GPUs can, at reduced speed, do double precision, which is 53 bits. The maximum precision for this zoom movie is 960 bits. So, unless you write code to compose high-precision math operations out of double-precision math then the GPU cannot even participate. And once you do that you will find that the GPU's speed advantage is mostly or entirely lost.
- Houshalter 11y agoCPUs can't do 960 bit operations either.
- rincebrain 11y agoYes, but we have a lot more experience and existing code for solving this on more monolithic systems, whereas the massively parallel architecture of a GPU stops having so many advantages when you have heavy dependencies between operations on different "cores" (e.g. needing to compose arbitrary-precision math out of smaller operations), and thereby end up needing to synchronize rather than letting the threads compute in parallel.
- brucedawson 11y ago- CPUs can do 64x64 multiplies that give 128-bit results. GPUs cannot. - CPUs can do add-with-carry. GPUs cannot. That means that GPUs are not very good at doing high-precision math. They lose a lot more efficiency implementing high-precision math than CPUs do. And GPUs are also worse at doing parallel calculations that end up following different paths, which inevitably happens when one pixel diverges before another. My back-of-the-envelope estimates show that GPUs are not worth it for this use-case. I will change my mind when I see a GPU-based deep zoom fractal program.