added comment about proven usefulness of this optimization

This commit is contained in:
Hans Dembinski 2021-09-27 10:26:27 +02:00
parent eef6e5bdbc
commit 1f1eda5c97

View File

@ -242,6 +242,7 @@ void fill_n_1(const std::size_t offset, S& storage, A& axes, const std::size_t v
for_each_axis(axes,
[&](const auto& ax) { all_inclusive &= axis::traits::inclusive(ax); });
if (axes_rank(axes) == 1) {
// Optimization: benchmark shows that this makes filling dynamic 1D histogram faster
axis::visit(
[&](auto& ax) {
std::tuple<decltype(ax)> axes{ax};