Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RawIndex = std::vector<std::array<.., 2>>. #294

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Oct 18, 2023

The memory layout of an std::vector<std::array<...>> is better than std::vector<std::vector<...>>. This allows HighFive to avoid numerous allocations and copies. Additionally, I feel it's simpler because it avoid the ambiguity of rows of differing length, when in fact the RawIndex seems to be a vector of ranges.

The memory layout of an `std::vector<std::array<...>>` is better than
`std::vector<std::vector<...>>`. This allows HighFive to avoid numerous
allocations and copies.
@1uc 1uc marked this pull request as ready for review October 18, 2023 17:20
@mgeplf mgeplf merged commit dd4c8eb into master Oct 19, 2023
29 checks passed
@mgeplf mgeplf deleted the 1uc/improve-RawIndex branch October 19, 2023 09:34
@mgeplf
Copy link
Contributor

mgeplf commented Oct 19, 2023

very nice, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants