-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
It seems like the most critical need right now is improved performance. I see three avenues:
- More Python/NumPy-level performance improvements. Apart from some micro-optimizations, I don't know that there is much more to be gained here (and said micro-optimizations may make future development more cumbersome).
- Assisted generation of compiled code via tools like Cython or Numba.
- I've written these sorts of algorithms in Cython before; the code can be painfully opaque but speed-ups are considerable when done right. Unlike Numba, NumPy's RandomState objects can be used fairly effectively by periodically regenerating a large list of random numbers.
- Numba was promising. However I'm increasingly unconvinced of its ability to accelerate more than a few isolated lines of code, and it doesn't play as nicely with NumPy's random number generation as it ought to.
- There are other tools (other JIT compilers, high-level modeling languages used in machine learning) that might be useful, but in my experience these often are 1) too restrictive (can't mix with plain Python code), 2) not broad enough (can't handle loops, or useful things like lists), or 3) slower than pure NumPy solutions (my personal experience with Theano).
- A pure C/C++ implementation, as proposed by @prismofeverything. I can't say much here.
Without a run-off of sorts, I don't know which solution would be best. I lean towards whatever is less complicated and more maintainable. As a final reflection I'll note that parts of NumPy, like the random number generation module, are written using a combination of pure C and Cython.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested