Skip to content

Bugfix and optimization for 1D Array/ArrayView#1884

Open
kennyweiss wants to merge 8 commits into
developfrom
feature/kweiss/array-opt
Open

Bugfix and optimization for 1D Array/ArrayView#1884
kennyweiss wants to merge 8 commits into
developfrom
feature/kweiss/array-opt

Conversation

@kennyweiss

@kennyweiss kennyweiss commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary

  • This PR is a bugfix and an optimization
  • It fixes a bug in the ArrayView copy/assign operator where the stride was not copied
  • It fixes a bug when copying strided ArrayViews into (unstrided) 1D Arrays
  • It optimizes the access operator for axom::Arrray<T,1>. Since this always has a unit stride, we should compile away the stride multiplication.
    • The new benchmarks show the following improvement:
      • Array<double>::address_bracket/1024: develop ~385 ns → branch ~283 ns (~26% faster)
      • Array<double>::address_flatIndex/1024: develop ~344 ns → branch ~283 ns (~18% faster)
  • I found this as a possible speedup for Bugfixes, benchmarks and improvements to FlatMap #1882, but it should benefit all axom::Array users

@kennyweiss kennyweiss added this to the FY26 August release milestone Jun 13, 2026
@kennyweiss kennyweiss self-assigned this Jun 13, 2026
@kennyweiss kennyweiss added bug Something isn't working Core Issues related to Axom's 'core' component Performance Issues related to code performance labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Core Issues related to Axom's 'core' component Performance Issues related to code performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant