The design of advanced synchrotron radiation sources requires precise algorithms for the simulation of electron trajectories in complex magnetic fields. However, multi-parameter studies can be very time consuming. Now, a team has developed a new algorithm which significantly reduces the computation time.