3 ms·
If you have a c++ compiler available you can get significant speedups without any changes to the code (except for using complex not np.complex, because it's dep
by cycomanic 5y ago
If you have a c++ compiler available you can get significant speedups without any changes to the code (except for using complex not np.complex, because it's deprecated). Just add a comment
#pythran export PyMandelbrot(uint8[:,:,:], int)
Note I passed the array into the function to remove the image creation from the module.
This yields a 18.6 ms vs 1.1s for the original for size 320.
As a side note I find it worrying that a blog which is called speed matters uses time instead of timeit.