Commit c398f4e
authored
Use threadpool for finding labels in chunk (#327)
* Use threadpool for finding labels in chunk
Great when we have lots of decent size chunks, particularly the NWM
county groupby: 600ms -> 400ms.
```
| Before [0cccb90] <optimize-again> | After [38fe8a6c] <threadpool> | Ratio | Benchmark (Parameter) |
|--------------------------------------|---------------------------------|---------|---------------------------------------------|
| 3.50±0.2ms | 2.93±0.07ms | 0.84 | cohorts.PerfectMonthly.time_graph_construct |
| 20.0±1ms | 9.66±1ms | 0.48 | cohorts.NWMMidwest.time_find_group_cohorts |
```
* Add threshold
* Fix + comment
* Fix benchmark.
* Tweak threshold
* Small cleanup
* Comment
* Try single allocation
* Revert "Try single allocation"
This reverts commit c6b93367e2024e60d77af24a69d177670a040dfc.
* cleanup1 parent eb3c0ef commit c398f4e
1 file changed
+43
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
271 | 273 | | |
272 | 274 | | |
273 | 275 | | |
274 | | - | |
275 | | - | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
281 | | - | |
282 | | - | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
286 | 289 | | |
287 | | - | |
288 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
289 | 325 | | |
290 | 326 | | |
291 | 327 | | |
| |||
0 commit comments