-
Notifications
You must be signed in to change notification settings - Fork 54
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
First numba tests. #40
base: master
Are you sure you want to change the base?
Conversation
Hi Shayne, I find this to be very nice as I believe numba may nicely circumvent all troubles with compilers and system configuration on Windows. I also really like the fact that there is no strict dependency on numba introduced in the package. I must add I have little to no experience with numba, mostly what I know comes from the documentation and a couple of tutorials, no hands-on experience, so I am afraid I am of little help with this. That said, I will still run the changes you suggest on my machine, maybe try a few changes and post my results here as soon as time allows. I am willing to merge this in a numba-dedicated branch right now and then merge into master when we're confident about the implementation details. Will write again soon. Best, GV |
Separate branch sounds good. http://jakevdp.github.io/blog/2013/06/15/numba-vs-cython-take-2/ is where I got the idea, it seems it could exceed Cython in speed. I'm not sure how (or if you'd need to) also interface it with BLAS. You have more experience with Numba than me then - I'm finding the documentation a bit scattered. I may need to add a helper function to split out the arguments for the two types, and change the kwargs to normal arguments - though that'll mess things up if the first kwarg is missing - so I have definitive types. Mostly, though, I can't figure out why I can't use an array to catch the tuple. As for the no hard dependency, I just copied your Cython code :) |
I have merged this pull request in |
EDIT: Tied to PR 43, because I didn't recommit to the same branch. Added a test script. For reasons I don't fully understand, I had to go remove Anyway, run outcome - first two numbers are numba runs in seconds, the second two are pure python runs. Not the way things are supposed to work!
|
Experiment in implementing simulateDSM in Numba to improve performance. Currently craters performance (37s on the test!), can't accept keyword arguments (just pass the values in the right place), plays badly with some type checking (disabled it), and I'm having trouble getting the second argument tuple specified correctly so I can specify all types instead of simply leaving it up to the library.
May work faster if I put individual JIT blocks in the function. Consider this a long term work in progress.