Skip to content

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.

2 participants