healpy/healpy — pull request #184 by apontzen (2014-05-29 19:11:26+00:00)
Title: Remove CPU overheads in _query_disc.pyx.

This pull request comprises a number of optimizations to _query_disc, especially for use cases where a query_X function is called multiple times. Using these I have seen reductions in typical CPU usage of about 95%, i.e. calls to query_X functions now run 20 times faster on my OS X 10.9.2 system with anaconda python.

1. The isnsideok call could take up to 50% of the CPU time for a typical query_* call. Resolved.
2. Allow passing in of a buffer to remove overhead of reallocating memory when repeated query_* calls are made.
3. Switch off bounds checking in pixset_to_array