einsteinpy: jit all the functions which are slow

🐞 Problem

Some methods are tooo slow! For which we brought einsteinpy.ijit.jit 🎯 Goal Make einsteinpy fast!

πŸ’‘ Possible solutions Identify the slow methods, and

from einsteinpy.ijit import jit

@jit
def ..

πŸ“‹ Steps to solve the problem

  • Comment below about what you’ve started working on.
  • Add, commit, push your changes
  • Submit a pull request and add this in comments - Addresses #<put issue number here>
  • Ask for a review in comments section of pull request
  • Celebrate your contribution to this project πŸŽ‰

P.S : See https://github.com/einsteinpy/einsteinpy/issues/98#issuecomment-583766397

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 19 (13 by maintainers)

Most upvoted comments

@SuyashSalampuria One good first issue is enough. You can dive into more complicated issues now πŸ˜ƒ

@sanju50201 Yeah, numba is quite limited when it comes to custom types (classes). See here & here.

However, in this particular case, you do not need to jit CartesianConversion (or other classes in the module), as the underlying functions are already using jit. See https://github.com/einsteinpy/einsteinpy/blob/main/src/einsteinpy/coordinates/utils.py.

You can perhaps experiment with the geodesics or the integrators modules, that aren’t numba-accelerated. Note that the classes or their methods are usually incompatible with numba, even with type annotations. Try jit-ing the functions in the corresponding utils.py modules, as with the coordinates module above.

@JeS24 This gives me a clear picture, thank you let me see on the other things you mentioned

@sanju50201 It is open. Feel free.

I would like to work on this.

Hey, I’m looking out for some slow methods right now, interested in solving this issue once I find them.