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

Adjoint instead of transpose in tests #5

Merged
merged 1 commit into from
Aug 17, 2022
Merged

Adjoint instead of transpose in tests #5

merged 1 commit into from
Aug 17, 2022

Conversation

dkarrasch
Copy link
Contributor

This came up in a nanosoldier run related to JuliaLang/julia#46196. While transpose(Q) can be constructed, there exist no specialized (multiplication) methods for it. In your (test) case here, you are constructing a Matrix right away, which therefore probably falls back to componentwise getindex, which is slow, whereas Matrix(Q') uses fast specializations.

My proposal is independent from the above-mentioned PR, and I'm pointing this out just in case this also occurs in code, not just in tests.

This came up in a nanosoldier run related to JuliaLang/julia#46196. While `transpose(Q)` can be constructed, there exist no specialized (multiplication) methods for it. In your (test) case here, you are constructing a `Matrix` right away, which therefore probably falls back to componentwise `getindex`, which is slow, whereas `Matrix(Q')` uses fast specializations.

My proposal is independent from the above-mentioned PR, and I'm pointing this out just in case this also occurs in code, not just in tests.
@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2022

Codecov Report

Merging #5 (a43d764) into main (2d4bd52) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #5   +/-   ##
=======================================
  Coverage   60.89%   60.89%           
=======================================
  Files           5        5           
  Lines         381      381           
=======================================
  Hits          232      232           
  Misses        149      149           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@FHoltorf FHoltorf merged commit 79a4cd3 into FHoltorf:main Aug 17, 2022
@FHoltorf
Copy link
Owner

Thanks for bringing that up. I was not aware and that will certainly be useful thing to know in the future. I will think the code base here looks fine. But I will doublecheck in a related package I built (github.com/FHoltorf/LowRankIntegrators.jl) as well.

Thanks for the heads up!

@dkarrasch dkarrasch deleted the patch-1 branch August 21, 2022 12:18
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