Skip to content

Improve performance of calculating the initial field distribution #3

Description

@DanielKotik

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)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions