Skip to content

Conversation

@dlfivefifty
Copy link
Contributor

This reopens #31314 after a dodgy rebase

`ldiv!` is currently allocating memory unnecessarily:
```julia
julia> n = 1000; A = randn(n,n); F = qr(A); b = randn(n);

julia> @time ldiv!(F, b);
  0.005001 seconds (9 allocations: 7.637 MiB)
```
The culprit is that `F.R` creates a copy. Using `UpperTriangular(F.factors)` is equivalent to `F.R` without the allocations.
Copy link
Member

@dkarrasch dkarrasch left a comment

Choose a reason for hiding this comment

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

There are a couple of minor suggestions, partly from the original PR.

@dkarrasch dkarrasch added the linear algebra Linear algebra label Nov 11, 2020
dlfivefifty and others added 2 commits November 11, 2020 13:48
@dkarrasch
Copy link
Member

Let's rerun CI and merge if tests pass.

@dkarrasch dkarrasch closed this Dec 9, 2020
@dkarrasch dkarrasch reopened this Dec 9, 2020
@dkarrasch dkarrasch added merge me PR is reviewed. Merge when all tests are passing backport 1.6 Change should be backported to release-1.6 and removed merge me PR is reviewed. Merge when all tests are passing labels Dec 9, 2020
@dkarrasch dkarrasch merged commit b1a2847 into JuliaLang:master Dec 9, 2020
Keno added a commit that referenced this pull request Dec 9, 2020
ldiv!(UpperTriangular(view(R,1:n,:)), view(B, 1:n, :))
return B
end
function ldiv!(A::QR, B::StridedVector)
Copy link
Member

Choose a reason for hiding this comment

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

This duplicates the method just below it. #38801

Keno added a commit that referenced this pull request Dec 9, 2020
@KristofferC KristofferC mentioned this pull request Dec 11, 2020
53 tasks
KristofferC pushed a commit that referenced this pull request Dec 11, 2020
Co-authored-by: Daniel Karrasch <[email protected]>
(cherry picked from commit b1a2847)
KristofferC pushed a commit that referenced this pull request Dec 11, 2020
Introduced in #38389

(cherry picked from commit d6f9948)
@dlfivefifty
Copy link
Contributor Author

Apologies: I think it was a result as rebase-gone-bad.

@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Dec 19, 2020
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linear algebra Linear algebra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants