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/2074#issuecomment-383754980,https://api.github.com/repos/pydata/xarray/issues/2074,383754980,MDEyOklzc3VlQ29tbWVudDM4Mzc1NDk4MA==,6815844,2018-04-23T23:32:33Z,2018-04-23T23:32:33Z,MEMBER,"@crusaderky , Thanks for the detailed benchmarking.
Further note:
+ `xr.dot` uses `tensordot` if possible, as when I implemented `dask` did not have `einsum`.
In the other cases, we use `dask.atop` with `np.einsum`.
In your example, `bench(100, False, ['t'], '...i,...i')` uses `dask.tensordot`,
`bench(100, True, ['t'], '...i,...i')` uses `np.einsum`.
`bench(100, True, [], ...i,...i->...i)` also uses `np.einsum`.
But I have no idea yet why `dot(a, b, dims=[])` is faster than `a * b`.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,316618290
https://github.com/pydata/xarray/issues/2074#issuecomment-383419435,https://api.github.com/repos/pydata/xarray/issues/2074,383419435,MDEyOklzc3VlQ29tbWVudDM4MzQxOTQzNQ==,6815844,2018-04-22T23:05:39Z,2018-04-22T23:06:05Z,MEMBER,"`xr.dot` was implemented before dask/dask#3412 was merged, and thus it is not very efficient for dask now.
> The proposed solution is to simply wait for dask/dask#3412 to reach the next release and then reimplement xarray.dot to use dask.array.einsum.
Agreed.
I think the reimplementation would be easy,
https://github.com/pydata/xarray/blob/99b457ce5859bd949cfea4671db5150c7297843a/xarray/core/computation.py#L1039-L1043
`dask='parallelrized'` -> `dask='allow'`
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,316618290