Performance issue on resize

Open
#32 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
performance

Research direction

Start by locating the boost::multi_array resize implementation and the handling for fortran_storage_order(). Use the minimal example at https://godbolt.org/z/GWbxcM14h to compare the current behavior and performance; done means resizing only the rightmost dimension preserves behavior without the nested std::copy calls described here.

Written by the indexing model from the issue text.

Description

When I use boost::multi_array with boost::fortran_storage_order(), and I want to .resize by only the latest (rightmost) dimension, the current implementation is a nested N function call (std::copy), one by dimension.
The same functionality can be reached with one std::copy on the storage.

This minimal example shows the problem:
https://godbolt.org/z/GWbxcM14h

Dominant language
C++
Stars
32
Forks
39
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/multi_array

All issues in boostorg/multi_array

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.