You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a huge Python bottleneck due to the high number of necessary function calls of the integrand function in psi_spherical. We use Cython to tackle this problem. According to a527d2d we start our journey from an average execution time of roughly one second:
In [1]: import beamprofile
In [2]: psi = beamprofile.main()
Using MPI version 3.1, 1 processes
In [3]: %timeit psi()
Calculating inital field configuration. This will take some time...
1 s ± 58.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
The text was updated successfully, but these errors were encountered:
In [1]: import optbeam
Please consider compiling `optbeam.py` via Cython: `$ cythonize -3 -i optbeam.py`
In [2]: beamLGspherical, beamLGcartesian, r = optbeam.main()
In [3]: psi = beamLGspherical.profile
In [4]: %timeit psi(r)
Calculating inital field configuration. This will take some time...
79.9 ms ± 408 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
Cython implementation (without disabled checks):
In [1]: import optbeam
In [2]: beamLGspherical, beamLGcartesian, r = optbeam.main()
In [3]: psi = beamLGspherical.profile
In [4]: %timeit psi(r)
Calculating inital field configuration. This will take some time...
9.25 ms ± 74.2 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
There is a huge Python bottleneck due to the high number of necessary function calls of the integrand function in
psi_spherical
. We use Cython to tackle this problem. According to a527d2d we start our journey from an average execution time of roughly one second:The text was updated successfully, but these errors were encountered: