Open alexander-held opened 1 year ago
I did a quick study to understand the differences with using awkward vs numpy in yield_stdev
using this workspace here.
First I kept the number of channels constant and changed the number of parameters, measuring the maximum memory usage during the function using memory-profiler
and measuring the time and saw the following results:
Then I kept the number of parameters constant by removing the staterror
modifiers and varied the number of channels:
I believe that a per-channel split will also help because it implicitly reduces the number of parameters per matrix computation.
This is a partial follow-up to #315. @ekauffma found that the yield uncertainty calculation can use a large amount of memory. This ultimately is due to using
awkward
instead of purenumpy
: https://github.com/scikit-hep/awkward/discussions/2480.awkward
is not strictly needed, but was used for convenience instead. Giving the impact of the effect, it makes sense to switch to purenumpy
though. This is done in the following PR:In addition to this, @ekauffma found that splitting the calculation across channels can significantly improve performance.
Additional performance improvements may be achieved via #415.