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

Performance Optimization #18

Closed
pulsipher opened this issue Nov 1, 2019 · 4 comments
Closed

Performance Optimization #18

pulsipher opened this issue Nov 1, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@pulsipher
Copy link
Collaborator

We need to analyze and optimize InfiniteOpt's structure to enhance performance. This might involve changes such as shifting to an array based structure instead of dictionaries. Also, the memory accessing should be better optimized to effectively leverage locality (i.e., use the cache memory effectively). We want to make it such that JuMP is the bottleneck.

@pulsipher pulsipher added the enhancement New feature or request label Nov 1, 2019
@pulsipher
Copy link
Collaborator Author

pulsipher commented Mar 18, 2020

It might be worth trying something like MOIU.CleverDicts.jl, but without ordered dictionaries. See #41

@pulsipher
Copy link
Collaborator Author

pulsipher commented Mar 21, 2020

We can also make a number of improvements in transcribe.jl such as passing in whether an expression has a measure, enabling unordered builds, and more. See #42.

@pulsipher
Copy link
Collaborator Author

pulsipher commented Sep 18, 2020

With the the complete overhaul brought on by #58 our performance is much better. Below is a comparison using the 3-node flexible design problem.

Version # Samples Time (s) # Allocations Memory
0.1.1 100 0.22 773.22 k 36.20 MiB
0.2.0 100 0.18 387.50 k 19.548 MiB
JuMP 100 0.57 1.05 M 52.56 MiB
0.1.1 1000 4.77 39.56 M 1.578 GiB
0.2.0 1000 0.36 1.20 M 58.673 MiB
JuMP 1000 0.60 1.38 M 75.36 MiB
0.1.1 5000 105.0 1.09 G 39.881 GiB
0.2.0 5000 1.19 4.85 M 234.74 MiB
JuMP 5000 1.09 2.90 M 179.10 MiB
0.1.1 10000 401.4 4.42 G 160.17 GiB
0.2.0 10000 2.65 9.42 M 445.25 MiB
JuMP 10000 1.877 4.79 M 301.18 MiB

Notably, now 0.2.0 seems to scale linearly with transcription size in stark contrast to the current release that just explodes. Moreover, the new version seems to be comparable to JuMP in terms of speed and memory (at least for this simple example).

@pulsipher
Copy link
Collaborator Author

In light of the above findings, overall performance as currently implemented is sufficient to close this general issue. In the future, we can/should open issues relating to specific performance improvements/problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant