pad

this is my attempt at creating the mandelbrot set, after having learned about it in my parallel computations course. it is of course done in uiua.

my initial solution was quite slow, but mostly because i did upwards of 1000 iterations before concluding that a given complex number would diverge. however, given the image size i worked with (400x400), this was overkill. changing it to 32 at most gave significant speed-up. with that, it was not worth doing any threading anymore.

then came jan makoso's solution, using repeat on by (+ dip un sqrt) as the driving force behind the Iter function. this yielded significant speed-up by trading spatial complexity through performing pervasive calculations with iterative depth of 32. i.e., instead of doing a loop for each pixel, we vectorize the instruction by working on the entire array at the same time. pervasive functions are thus highly desirable for performant calculations, though at the cost of memory.

so, we essentially cheat in this case to make the image draw near instantly.

result of running the code on the pad

Description
mandelbrot in uiua
Readme 31 KiB