Part of beam evaluation reduction: more clean-up and preparation
Changes:
- Generally avoiding some verbose constructs which could be done more concisely.
- Instead of passing around
shared_ptr
inside critical loops, references to patches are now stored as pointers.shared_ptr
cause an extra synchronisation which I rather avoid in critical loops. - This MR also avoids xtensor's
+=
operator in a crucial place, as it turns out xtensor does this operation very slow. It is now integrated into the beam application step -- this not only avoids xtensor's+=
, but also reduces the amount of times we need to go through the data.
I've heavily timed the changes and all changes had a positive effect on performance.
Edited by Andre Offringa