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

WIP: try guvectorize #5

Open
albop opened this issue Jan 18, 2016 · 0 comments
Open

WIP: try guvectorize #5

albop opened this issue Jan 18, 2016 · 0 comments

Comments

@albop
Copy link
Member

albop commented Jan 18, 2016

The functions which evaluate at one single point, can be vectorized using guvectorize. This is currently much faster than repeated calls of the evaluation function and almost as efficient as a manually inlined vectorized call.
Also, one can take advantage of the new 'parallel' keyword, to use multiple cpus.
Here are the timings for the usual experiment: 50x50x50 grid. Evaluation on 10^6 points:

Manual vectorization : 0.1056051254272461
GUVectorize : 0.10982108116149902
GUVectorize (parallel): 0.03372311592102051

Advantages:

  • for the same price: scalar evaluation and allocating/non-allocating calls.
    Caveats:
  • ... ? (maybe, gufun signatures involving scalars is unnatural)
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