-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I was puzzled about the claimed performance obtained vs the author's expectations.
Not knowing which comparison was made, I looked at the first tutorial to see what kind of computation does this library do (I'm familiar with wave optics in general, but never wrote a Physical optics code myself) and run a basic benchmark.
The computation is as follows:
0.1% of time setting up a grid, and evaluating a boolean function in such grid.
99.9% of time doing a 2D-FFT.
So I wouldn't expect Julia to beat Numpy in this particular case, as the only thing being benchmarked actually is the FFT library, which in both cases is coded in C.
The more advanced examples in the documentation deal with evaluating special functions on the initial grid, which also seems to be quite an inexpensive operation compared with the FFT.
So it doesn't matter that maybe that particular step is substantially faster to do in Julia, if it is still less than 1% of the total computational cost.