Wolfram Language, Visualization, Programming, Math, Complex Analysis.
Attributes[f] = {Listable} c = ConstantArray[0.0 + 0.0*I, 1000000] f[c] This performs the same operation in about 500 milliseconds, so 200 ms less than before. In simple cases, you can also take advantage of functions with built-in performance optimizations. In this case, squaring a number (a