This repository was archived by the owner on Jan 22, 2023. It is now read-only.
Repository navigation
Commit 1d4f15c
Alex Conley
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 astropy/astropy#2479 (sorta; some more sophisticated options were
also discussed for that, and this just does the simple bit).1 parent 353670c commit 1d4f15c
1 file changed
Lines changed: 19 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
42 | | - | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| |||
132 | 144 | | |
133 | 145 | | |
134 | 146 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
139 | 151 | | |
140 | 152 | | |
141 | | - | |
142 | | - | |
| 153 | + | |
| 154 | + | |
143 | 155 | | |
144 | 156 | | |
145 | 157 | | |
| |||
0 commit comments