astropy/astropy — pull request #3164 by mdboom (2014-12-01 18:58:31+00:00)
Title: Don't use Cython for ERFA wrappers

This work is much less necessary now that #3141 is merged, but I still thought I'd share it. The measurable differences are fairly small, so I think it ultimately comes down to maintainability and elegance. I, personally, don't care much for Cython-based wrappers as it can be very difficult to optimize and debug due to the extra level of indirection, but I know there are those that prefer it to C.

This is basically a direct port of the @jwoillez' Cython wrappers to pure C. It shaves 3 seconds off of the compile time vs. current master (after the Cython/Python splitting of the ERFA wrappers). `from astropy import erfa` uses about 750k less memory in this version.

As for speed, there is a speed advantage to this, particularly for small arrays (with larger arrays the time of ERFA itself dominates):

![c_vs_cython](https://cloud.githubusercontent.com/assets/38294/5251286/1a78579a-7962-11e4-9461-083015276219.png)