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

Optimising for speed #3

Open
CarlAndersson opened this issue May 17, 2018 · 1 comment
Open

Optimising for speed #3

CarlAndersson opened this issue May 17, 2018 · 1 comment

Comments

@CarlAndersson
Copy link
Member

Faster execution is always nice! The most relevant parts (for me) are: 1) the initialisation of cost functions, i.e. calculating the spatial derivatives; 2) the optimisation procedure, i.e. evaluating the cost functions; 3) visualising the field.

The solution to 1) and 2) would be to profile properly is different cases, check if the implementation can be improved, and possible use numba or cython to increase execution speed.

The solution to 3) can partly be as for 1) and 2), but in might also be to replace matplotlib with something else. I've noted that displaying the plots can sometimes be as expensive (or more) as calculating the result.

@CarlAndersson
Copy link
Member Author

I've noticed that there are significant limitations in storing the spatial derivatives in dicts. The major reason for this is that loops are frequently required when working with more than one point.
A solution would be to store them in a normal numpy array in a defined way. For easy mapping from string form to index form a top level function or dict could be used to keep track of the correct indices.

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

No branches or pull requests

1 participant