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

performance test #14

Closed
nilsbecker opened this issue Dec 13, 2016 · 1 comment
Closed

performance test #14

nilsbecker opened this issue Dec 13, 2016 · 1 comment

Comments

@nilsbecker
Copy link
Contributor

a nitpick: the map operation is not idiomatic numpy; normally you would just do np.sin(array) + 1, as you're surely aware. maybe it would be instructive adding that result for comparison?

another interesting performance test may be something that involves taking slices and iterating over them along various dimensions, forcing iteration over non-contiguous memory?

@ryanrhymes
Copy link
Member

a nitpick: the map operation is not idiomatic numpy; normally you would just do np.sin(array) + 1, as you're surely aware. maybe it would be instructive adding that result for comparison?

Yes, you are right. sine function has already been vectorised in Numpy. My example in the test was not very nice actually :) I added some explanation to clarify the point: whenever we have to plug in our own function which may not have a vectorised version in Numpy, Python can be very slow.

another interesting performance test may be something that involves taking slices and iterating over them along various dimensions, forcing iteration over non-contiguous memory?

This is a good idea. I will try to do some tests whenever I have some free time. Thanks again.

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

2 participants