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

some a_func refactoring #4

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

some a_func refactoring #4

wants to merge 1 commit into from

Conversation

David-Baddeley
Copy link
Collaborator

Some small optimisations to weight matrix computation.

Most likely breaks things, as I was also playing with different weights. Changing lines 169-171 it should be easy enough to get back to original weights.

Optimisations:

  • hard coded dimensionality (permits compiler loop unrolling/vectorisation)
  • move some array accesses out of inner loop, try and reduce un-needed memory lookups
  • PyMem_Calloc instead of calloc
  • expf instead of exp (avoid cast, possibly faster as less precision needed)

@David-Baddeley
Copy link
Collaborator Author

overall gives a factor of 2-3 in compute_weight_matrix

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

Successfully merging this pull request may close these issues.

None yet

1 participant