Skip to content

Commit 2ed4cae

Browse files
committed
added comment about proven usefulness of this optimization
1 parent 87b3a58 commit 2ed4cae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/boost/histogram/detail/fill_n.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ void fill_n_1(const std::size_t offset, S& storage, A& axes, const std::size_t v
242242
for_each_axis(axes,
243243
[&](const auto& ax) { all_inclusive &= axis::traits::inclusive(ax); });
244244
if (axes_rank(axes) == 1) {
245+
// Optimization: benchmark shows that this makes filling dynamic 1D histogram faster
245246
axis::visit(
246247
[&](auto& ax) {
247248
std::tuple<decltype(ax)> axes{ax};

0 commit comments

Comments
 (0)