Skip to content

Conversation

odow
Copy link
Member

@odow odow commented May 24, 2021

No bugs. Just some tidying and adding stand-alone tests.

@odow odow added the Submodule: Utilities About the Utilities submodule label May 24, 2021
for term in terms
colptr[index_map[_variable(term)].value+1] += 1
end
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blegat what was the motivation to have these _allocate_terms function barriers?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It dates back to jump-dev/SCS.jl#192 where I benchmarked the two approaches and the function barrier seemed to be faster even if I didn't really get why.
It's maybe not the case anymore in Julia v1.6 or maybe I was mistaken when writing this.
We can revisit later. An easier speedup would be obtained by using @inbounds I guess.
The good thing with MatrixOfConstraints is that we will be able to spend time optimizing these pieces at once in MOI and it will affect all solver's copy_to performance so it might start being worth playing with @inbounds, etc...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the massive amount of new complexity we're introducing, I'd rather that we merged a simplified version first, got it working and debugged, then wrote the various solvers, and only then revisited performance implications with benchmarks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely

@odow odow merged commit 0feec2d into master May 24, 2021
@odow odow deleted the od/sparse_matrix branch May 24, 2021 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Submodule: Utilities About the Utilities submodule
Development

Successfully merging this pull request may close these issues.

2 participants