| .. | ||
| bench.py | ||
| bench_plot.py | ||
| loading-slowdown-ns128.svg | ||
| loading-timings-ns128.svg | ||
| README.md | ||
| results_ns128 | ||
Benchmark
Benchmarks details
-
Create in memory a list of
N=128one dimensional numpy arrays of lengthLstarting fromL=2up toL=2^22=4_194_304in steps of powers of two. -
Given that each item of the array is of type
float64, i.e. 8 bytes, the size of the arrays goes from16Bto32M -
The total memory required is at least
128 × 32M × 2 = 8G -
Load the whole list in one big numpy array of size
NxL(good) andLxN(bad). The corresponding loops are:# good loop (store each time series on a different row) for row, time_series in enumerate(collection): ts[row, :] = time_series# bad loop (store each time series on a different column) for column, time_series in enumerate(collection): ts[:, column] = time_series -
Time the bad and the good loop
-
Plot the timings for the good and the bad loop as a function of
L -
Plot
slowdown = time_bad/time_goodas a function ofL