In [1]:
! cat ../scripts/dask-ex.py


import dask, time
import dask.array as da

def do_dot():
    t0 = time.time()
    x = da.random.random((12000, 12000), chunks=(4000, 4000))
    s = x.dot(x.T).sum().compute()
    print('Time: ',time.time() - t0)

for x in range(3):
    do_dot()

In [2]:
! python ../scripts/dask-ex.py


Time:  8.24970269203186
Time:  7.267415285110474
Time:  7.527649641036987

In [3]:
! python -m TBB ../scripts/dask-ex.py


Time:  4.900471925735474
Time:  4.906714916229248
Time:  5.184909343719482