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

added methods of istriu and istril for Transpose and Adjoint arguments #28236

Merged
merged 1 commit into from
Jul 29, 2018
Merged

added methods of istriu and istril for Transpose and Adjoint arguments #28236

merged 1 commit into from
Jul 29, 2018

Conversation

KlausC
Copy link
Contributor

@KlausC KlausC commented Jul 23, 2018

Performance optimization can be achieved. The following demonstrates the difference:

julia> @btime istriu(qrf.R)
  2.192 μs (0 allocations: 0 bytes)
true

julia> @btime istril(transpose(qrf.R))
  3.537 ms (1 allocation: 16 bytes)
true

julia> typeof(qrf.R)  # this was a 960x960 sparse matrix with 20% fill ratio.
SparseMatrixCSC{Float64,Int64}

# the follwing uses the new method:
julia> @btime istril(qrf.R')
  2.227 μs (1 allocation: 16 bytes)
true

There is a performance improvement of factor 1500 (3.54 ms vs. 2.23 µs).

@JeffBezanson JeffBezanson added linear algebra Linear algebra performance Must go faster labels Jul 24, 2018
@JeffBezanson
Copy link
Member

LGTM. @andreasnoack ?

@andreasnoack
Copy link
Member

The AbstractArray fallbacks strike again. Thanks for fixing this.

@andreasnoack andreasnoack merged commit b5883f7 into JuliaLang:master Jul 29, 2018
@KlausC KlausC deleted the istriu_for_transpose_and_adjoint branch July 30, 2018 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants