Commit 70ce7f4
committed
Significantly improve fit-grains performance
Profiling showed that the list comprehension in `objFuncFitGrain`
was taking a significant amount of time. This is because that
function is called repeatedly during the least squares fit, and
repeatedly performing the list comprehension would take a substantial
amount of time.
Performing the list comprehension outside of `objFuncFitGrain` was
shown to provide a substantial speedup.
Signed-off-by: Patrick Avery <[email protected]>1 parent 10a6691 commit 70ce7f4
1 file changed
+31
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
82 | 108 | | |
83 | 109 | | |
84 | 110 | | |
| |||
185 | 211 | | |
186 | 212 | | |
187 | 213 | | |
188 | | - | |
| 214 | + | |
189 | 215 | | |
190 | 216 | | |
191 | 217 | | |
| |||
214 | 240 | | |
215 | 241 | | |
216 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
217 | 246 | | |
218 | 247 | | |
219 | 248 | | |
| |||
0 commit comments