mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-11 13:14:06 +00:00
added comment about proven usefulness of this optimization
This commit is contained in:
parent
eef6e5bdbc
commit
1f1eda5c97
@ -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,
|
for_each_axis(axes,
|
||||||
[&](const auto& ax) { all_inclusive &= axis::traits::inclusive(ax); });
|
[&](const auto& ax) { all_inclusive &= axis::traits::inclusive(ax); });
|
||||||
if (axes_rank(axes) == 1) {
|
if (axes_rank(axes) == 1) {
|
||||||
|
// Optimization: benchmark shows that this makes filling dynamic 1D histogram faster
|
||||||
axis::visit(
|
axis::visit(
|
||||||
[&](auto& ax) {
|
[&](auto& ax) {
|
||||||
std::tuple<decltype(ax)> axes{ax};
|
std::tuple<decltype(ax)> axes{ax};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user