Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Speed improvements to gravmag.tesseroid#58

Merged
leouieda merged 16 commits into
masterfrom
tesseroid
Sep 19, 2013
Merged

Speed improvements to gravmag.tesseroid#58
leouieda merged 16 commits into
masterfrom
tesseroid

Conversation

@leouieda

Copy link
Copy Markdown
Member

Moved some things over to Cython, precomputing sines and cossines, using buffers to avoid malloc in loops and removed most numpy array fancy indexing.
Comparing to Tesseroids (written in C):

  • 2x slower for 2deg tesseroids at 50km
  • 10% faster for 1deg tesseroids at 50km
  • 1.75x faster for 1deg tesseroids at 250km
  • 2x faster for 2deg tesseroids at 250km

Current bottlenecks are:

  1. Calculating distances
  2. Separating for which computation points I need to divide the tesseroid

So it seems that, if I need to split he tesseroid a lot, then the Python code is really slow.
But in cases that I have computation at least 1x size of tesseroid away, the Python code is much faster the C.

leouieda added a commit that referenced this pull request Sep 19, 2013
Speed improvements to `gravmag.tesseroid`
@leouieda leouieda merged commit 870e59c into master Sep 19, 2013
@leouieda leouieda deleted the tesseroid branch September 19, 2013 16:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant