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

Possible __call__ improvement #51

Open
sixpearls opened this issue Sep 1, 2019 · 0 comments
Open

Possible __call__ improvement #51

sixpearls opened this issue Sep 1, 2019 · 0 comments

Comments

@sixpearls
Copy link
Collaborator

It's possible this approach would provide a marginal speed boost to __call__: perform the spline evaluation values broadcast with a reshape operation, and save the reshape argument which does not change.

In init:
self.interval_workspace_broadcast_shape = (-1,) + (1,)*self.xdim

in second argument to np.add of compute_basis_coefficient_selector:
replace:
self.interval_workspace[i][(slice(0,num_points),) + (None,)*self.xdim],
with:
self.interval_workspace[i, :num_points].reshape(self.interval_workspace_broadcast_shape),

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

No branches or pull requests

1 participant