Skip to content

add_next_values method on SparseMatrix, much faster _build_sparse_matrix on numpy arrays#382

Open
linusheck wants to merge 1 commit intostormchecker:masterfrom
linusheck:add-next-values
Open

add_next_values method on SparseMatrix, much faster _build_sparse_matrix on numpy arrays#382
linusheck wants to merge 1 commit intostormchecker:masterfrom
linusheck:add-next-values

Conversation

@linusheck
Copy link
Copy Markdown
Contributor

See #380. This improves matrix building time a lot in some specific cases, such as loading from numpy arrays.

Copy link
Copy Markdown
Contributor

@volkm volkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one comment.

Comment thread src/storage/matrix.cpp
}
size_t groupIdx = 0;
for (size_t i = 0; i < rows.size(); ++i) {
while (groupIdx < rowGroupIndices.size() && rowGroupIndices[groupIdx] <= rows[i]) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use an iterator here?

@volkm
Copy link
Copy Markdown
Contributor

volkm commented Apr 14, 2026

Merging the master should make the CI run through again.

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.

2 participants