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

improve performance for sparse matrix vector indexing #29696

Merged
merged 1 commit into from
Oct 22, 2018

Conversation

KristofferC
Copy link
Sponsor Member

Same idea as in #29682

julia> using SparseArrays, Random

julia> A = sprand(10^6, 10^6, 10 / (10^6))

julia> a = randperm(size(A,1))

Before

julia> @time A[a, a];
  1.871472 seconds (3.00 M allocations: 373.896 MiB, 10.60% gc time)

After

julia> @time A[a, a];
  1.414649 seconds (31 allocations: 206.057 MiB, 6.81% gc time)

@KristofferC KristofferC added performance Must go faster sparse Sparse arrays labels Oct 17, 2018
@KristofferC KristofferC merged commit 0e023d0 into master Oct 22, 2018
@KristofferC KristofferC deleted the kc/indexing_perf branch October 22, 2018 15:56
KristofferC added a commit that referenced this pull request Oct 29, 2018
KristofferC added a commit that referenced this pull request Oct 31, 2018
KristofferC added a commit that referenced this pull request Nov 2, 2018
KristofferC added a commit that referenced this pull request Feb 11, 2019
KristofferC added a commit that referenced this pull request Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster sparse Sparse arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant