Notebook
real 0m4.926s user 0m4.889s sys 0m0.358s
real 0m1.722s user 0m4.871s sys 0m0.368sTakeaway: it's 3-4x faster running CPU-bound code on 4 parallel threads instead of 1
CPU times: user 6.27 s, sys: 424 ms, total: 6.69 s Wall time: 7.49 s Takeway: For the single-thread case we'd just be adding a bunch of overhead, but the code is easy to read and seems to work
CPU times: user 4.68 s, sys: 12 ms, total: 4.7 s Wall time: 2.65 s Takeway: faster, but 1s slower than just using rasterio
CPU times: user 5.83 s, sys: 542 ms, total: 6.37 s Wall time: 2.73 s Takeaway: Same as above we just use single machine scheduler rather than LocalCluster from dask.distributed