Skip to content

Conversation

@hellemo
Copy link

@hellemo hellemo commented May 24, 2023

For high performance in JuMP for sparse problems you might have a look at SparseVariables.jl which was designed for these kinds of problems. There is just a small advantage for the largest problem sizes here, but if you find indexing with tuples cumbersome and/or want to do slicing, it can offer greater advantages both in performance and ergonomics.

EDIT: Added slice version courtesy of @trulsf

JuMP done 5600 in 1.1s
Sparse JuMP done 5600 in 1.21s
Slice JuMP done 5600 in 1.62s
Intuitive JuMP done 5600 in 1.47s
JuMP done 6700 in 1.55s
Sparse JuMP done 6700 in 1.46s
Slice JuMP done 6700 in 2.03s
Intuitive JuMP done 6700 in 1.86s
JuMP done 7900 in 1.93s
Sparse JuMP done 7900 in 1.84s
Slice JuMP done 7900 in 2.48s
Intuitive JuMP done 7900 in 2.56s

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant