Repository navigation
Conversation
reduce visited every input cell through indexed() and computed the output index with result.at(idx) per cell. It now builds one lookup table per axis which maps each stored input position to an output offset, or marks it as skipped, and runs a nested strided loop over the raw storage. Skipped outer slabs are skipped as a block, so crop and pick in crop mode scale with the output size. For arithmetic dense storages, runs of input cells which land in the same output cell are summed in a local accumulator, in the same order as before. Adds pick benchmarks which mirror the boost-histogram python benchmarks, and a test with large axes which exercises the heap-backed lookup table. Assisted-by: ClaudeCode:claude-fable-5-1 ClaudeCode:claude-fable-5-1
Drop reduce_command::lut and fill the per-axis table for pick commands directly, which removes a heap allocation per picked axis and the underflow special case. Use axis::traits::extent for the axis extent and share the setup of the pick benchmarks. Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
The stack buffer saved about 12 ns per call, visible only on 1D histograms with few bins. Assisted-by: ClaudeCode:claude-fable-5-1
Assisted-by: ClaudeCode:claude-opus-5-5
Add detail::cell_map, which maps each input cell to an output offset through one lookup table per axis and visits the cells line by line. reduce and storage_grower now both use it. storage_grower no longer steps through a multi-index cell by cell. Assisted-by: ClaudeCode:claude-opus-5-5
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Depends on #448. This branch contains the commits of #448; only the last commit is new.
Adds
detail::cell_map, which holds one lookup table per axis that maps each stored input bin to an output offset, and visits the input cells line by line along the first axis.reduceandstorage_growerboth use it.storage_growerno longer steps through a multi-index and callsfor_each_axisfor each cell. The rank-0 special case inreducemoves intocell_map.Growth benchmark (3D, 30³ regular growth axes, one fill that grows one axis by one bin, histogram copy included):
For large histograms, allocating and zeroing the new storage takes most of the time.