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

[runtime] No memory allocation during Kinsol F scaling function #11455

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

AnHeuermann
Copy link
Member

Related Issues

While solving #11454 I noticed that we allocate and free large matrices all the time.

Purpose

Less memory allocation = more speedz!

Approach

Don't do that. Allocate once and only if needed.

@AnHeuermann AnHeuermann self-assigned this Oct 26, 2023
  - Don't allocate additional Jacobian matrix and work arrays for each call.
  - Reuse already existing Jacobian, allocate work vectors only once and only if needed
@AnHeuermann AnHeuermann merged commit 1acc680 into OpenModelica:master Nov 7, 2023
2 checks passed
@AnHeuermann AnHeuermann deleted the less-alloc branch November 7, 2023 13:09
@casella
Copy link
Contributor

casella commented Nov 7, 2023

Very good!

@casella casella added this to the 1.23.0 milestone Nov 7, 2023
@casella casella added the COMP/OMC/Runtime Issues and pull requests related to the runtime for OMC (not simulation runtime). label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/OMC/Runtime Issues and pull requests related to the runtime for OMC (not simulation runtime).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants