pull_requests: 809757123
This data as json
id | node_id | number | state | locked | title | user | body | created_at | updated_at | closed_at | merged_at | merge_commit_sha | assignee | milestone | draft | head | base | author_association | auto_merge | repo | url | merged_by |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
809757123 | PR_kwDOAMm_X84wQ-nD | 6107 | closed | 0 | is_dask_collection: micro optimization | 10194086 | In #6096 I realized that `DuckArrayModule("dask")` is called a lot in our tests - 145'835 times. Most of those are from `is_dask_collection` (`is_duck_dask_array`) This change avoids that the instance needs to be built every time. ```python import xarray as xr %timeit xr.core.pycompat.DuckArrayModule("dask").available %timeit xr.core.pycompat.dsk.available ``` ``` 18.9 µs ± 97.7 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) 77.1 ns ± 1.22 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) ``` Which leads to an incredible speed up of our tests of about 2.7 s :grin: ((18.9 - 0.0771) * 145835 / 1e6). | 2021-12-24T15:04:42Z | 2022-01-26T08:41:28Z | 2021-12-29T16:27:55Z | 2021-12-29T16:27:55Z | e391f131451ca8962106f2a146abd024b91e21e2 | 0 | fa137f2473ac19309ddf06606ecf2a03a5012d36 | a2d968b8fc5e0749f3db58862296716068ce934d | MEMBER | 13221727 | https://github.com/pydata/xarray/pull/6107 |
Links from other tables
- 0 rows from pull_requests_id in labels_pull_requests