Skip to content

Weights caching and column to_numpy to speedup histogram filling

Davide Valsecchi requested to merge github/fork/valsdav/main into main

The histogram filling has been speed up by caching the broadcasted weights, when the weights are event-level and the data_structure is 1-D.

Moreover profiling the filling I observed that the hist.fill() method is much faster then we pass numpy arrays instead of awkward arrays. I have included a to_numpy while caching the variables to fill.

This PR brings a ~30% speedup in the histogram filling phase, which with >10 categories can save quite a lot of time.

Merge request reports