Skip to content

Misc performance improvements#27

Draft
Bisaloo wants to merge 4 commits intoconst-ae:develfrom
Bisaloo:performance
Draft

Misc performance improvements#27
Bisaloo wants to merge 4 commits intoconst-ae:develfrom
Bisaloo:performance

Conversation

@Bisaloo
Copy link
Copy Markdown

@Bisaloo Bisaloo commented Mar 26, 2026

Related to each commit, in order:

Each one of these changes has a significant performance impact when the code pattern is benchmarked separately. I didn't measure the final impact of this on a typical use of lemur. A benchmark should be run, potentially with https://github.com/DavisVaughan/cross.

I think I didn't break anything but a review is needed. In all cases, I don't think this should be merged before the next Bioconductor release. I'm opening a draft PR now because I move on to other things and I forget.

Comment on lines +29 to +30
gamma <- gamma - (gamma %*% xi %*% crossprod(xi, gamma)) / c(1 + crossprod(xi, gamma %*% xi))
beta <- beta - gamma %*% xi %*% (crossprod(xi, beta) - yi)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

In this kind of cases, it may be smart to investigate how it's better to associate the operations because (AB)C might be more performant than A(BC).

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.

1 participant