From 1f1eda5c97c2cdb76f4c5c241ef192d9e67ce0ed Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Mon, 27 Sep 2021 10:26:27 +0200 Subject: [PATCH] added comment about proven usefulness of this optimization --- include/boost/histogram/detail/fill_n.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/boost/histogram/detail/fill_n.hpp b/include/boost/histogram/detail/fill_n.hpp index 128bc4c1..520b301e 100644 --- a/include/boost/histogram/detail/fill_n.hpp +++ b/include/boost/histogram/detail/fill_n.hpp @@ -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 axes{ax};