astropy/astropy — pull request #2542 by aconley (2014-05-21 17:22:07+00:00)
Title: Speedup of initialization for cosmology objects

* Speed up initialization by about a factor of 100 by pre-computing
some unit conversion quantities. It turns out this was the
dominant cost, particularly the call to const.G.cgs.
* import astropy.cosmology time falls by about 50%
* Passes all unit tests
* Closes #2479 (sorta; some more sophisticated options were
also discussed for that, and this just does the simple bit).