-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Performance issue with (sparse) backslash (and/or QR factors?) #30288
Comments
briochemc
changed the title
Performance issue with backslash
Performance issue with backslash (and/or QR factors?)
Dec 6, 2018
briochemc
changed the title
Performance issue with backslash (and/or QR factors?)
Performance issue with (sparse) backslash (and/or QR factors?)
Dec 6, 2018
andreasnoack
added a commit
that referenced
this issue
Dec 6, 2018
instead of using a view to avoid slow fallback in back substitution. Fixes #30288
KristofferC
pushed a commit
that referenced
this issue
Dec 7, 2018
Thanks guys! |
KristofferC
pushed a commit
that referenced
this issue
Dec 12, 2018
KristofferC
pushed a commit
that referenced
this issue
Feb 11, 2019
KristofferC
pushed a commit
that referenced
this issue
Feb 20, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I probably don't understand what is happening but I think this is worth inspecting: I ran into an odd performance issue when performing a back-substitution. Below is a not-so-minimal working example (NSMWE). What strikes me is that I always thought the expensive part in using
\
was the factorization, but in this NSMWE, it is the back-substitution that is slowing things down. if you run the example below, it will print the@btime
forΔ \ x
the direct backslash use (~15 s on my machine),Δf = factorize(A)
the factorization (~0.8 s), andΔf \ x
the back-substitution (~15 s)[EDIT: Note that
Δf
is of typeSuiteSparse.SPQR.QRSparse{Float64,Int64}
, so this might be a QR-specific issue. In case that helps, the sparse matrixΔ
itself represents a simple 2D discrete Laplacian, i.e., mostly a bunch of-4
s on the "diagonal" and-1
s "off-diagonal"]This is the exact output on my machine:
I put everything in a little module so as to not pollute the output without adding semicolons everywhere.
(Also note that I have tried the same thing in MATLAB, and using
tic
andtoc
to time\
shows me it done in about 0.5 s.)The NSMWE:
I would like for this performance issue to be resolved so that I can claim that Julia's version of
inpaint
(that I ported into a recently released package, Inpaintings.jl) is as fast as MATLAB'sinpaint_nans
😃The text was updated successfully, but these errors were encountered: