As part of a recent PyData talk, I did some timing tests to compare the performance of various methods of translating a large number of geographic locations represented as ECEF XYZ to latitude / longitude / altitude.

I ran this for both 10,000 points and 1,000,000 points using the following methods:

  • Native Python (using built-in lists)
  • Numpy
  • Pandas
  • Numba (using Numpy array then Pandas DataFrame)
  • Numexpr (using Numpy array then Pandas DataFrame)
  • Cython (with Numpy array)
  • Cython Parallel (with Numpy array)

You can find the code here in a Jupter notebook.

The results are below. There is an issue worth noting (that I haven’t had time to run to ground) and that is that clearly the parallel Cython implementation is not correct since it is virtually identical in timing to the non-parallel implementation.

Summary Table

Execution Time (per point)

Compare to Native Python