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 of IPM #404

Merged
merged 3 commits into from
Aug 3, 2024
Merged

Improve performance of IPM #404

merged 3 commits into from
Aug 3, 2024

Conversation

mateuszbaran
Copy link
Member

This significantly improves performance of interior point Newton method. Together with some light improvements to ManifoldsBase, I got from 9ms to below 3ms on the problem from the test suite. The two biggest issues were:

  1. Accessing product manifold components like Y[N, 1] is really slow. I recommend using things like Y1, Y2 = submanifold_components(N, Y) in performance-sensitive code. Maybe it would be possible to speed up Y[N, 1] but it would require tinkering with compiler heuristics which is quite difficult and depends on the version of Julia.
  2. Broadcasting. It can eliminate vast majority of intermediate arrays.

Not that many potential gains remain as those 3ms are dominated by calls to Hessian and gradient of g.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.78%. Comparing base (0b05c8c) to head (2705059).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #404   +/-   ##
=======================================
  Coverage   99.78%   99.78%           
=======================================
  Files          76       76           
  Lines        8217     8226    +9     
=======================================
+ Hits         8199     8208    +9     
  Misses         18       18           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kellertuer
Copy link
Member

I was not aware of the first. For the second I was maybe more focused on the math being correct. Thanks for fixing this :)

Copy link
Member

@kellertuer kellertuer left a comment

Choose a reason for hiding this comment

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

at least the sub manifold components I would not have known to use. thanks for those improvements.

@mateuszbaran mateuszbaran merged commit 2594c7a into master Aug 3, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants