Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Conversation

@ghislainb
Copy link
Contributor

This uses an intermediate structure to arrange the indices of the columns of the matrix by rows and avoid the nested for-loops of complexity O(nnz^2).

Benchmark #93 on my local machine, old version :

julia> @time matrix2graph(jacsparsity, false)
447.022331 seconds (1.02 M allocations: 100.974 MiB, 0.01% gc time)

New version :

julia> @time matrix2graph(jacsparsity, false)
  0.158604 seconds (1.18 M allocations: 116.212 MiB, 24.89% gc time)

[my first Julia PR ! 😃 ]

@ChrisRackauckas ChrisRackauckas merged commit 46f7dfb into JuliaDiff:master May 12, 2020
@ChrisRackauckas
Copy link
Member

fantastic!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants