home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 396725591

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/2227#issuecomment-396725591 https://api.github.com/repos/pydata/xarray/issues/2227 396725591 MDEyOklzc3VlQ29tbWVudDM5NjcyNTU5MQ== 1217238 2018-06-12T20:38:47Z 2018-06-12T20:38:47Z MEMBER

My measurements: ```

%timeit ds.a.isel(time=time_filter) 1 loop, best of 3: 906 ms per loop %timeit ds.a.isel(time=time_filter.values) 1 loop, best of 3: 447 ms per loop %timeit ds.a.values[time_filter] 10 loops, best of 3: 169 ms per loop ```

Given the size of this gap, I suspect this could be improved with some investigation and profiling, but there is certainly an upper-limit on the possible performance gain.

One simple example is that indexing the dataset needs to index both 'a' and 'time', so it's going to be at least twice as slow as only indexing 'a'. So the second indexing expression ds.a.isel(time=time_filter.values) is only 447/(169*2) = 1.32 times slower than the best case scenario.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  331668890
Powered by Datasette · Queries took 0.623ms · About: xarray-datasette