`Save` slower than raw computation

asked 2021-08-11 18:07:20 +0200

tkarn gravatar image

I have a computation which takes several minutes to run. Using cell magic %%time I get the following timing:

CPU times: user 6min 51s, sys: 29.8 s, total: 7min 21s
Wall time: 7min 28s

I thought it would be nice to not have to recompute the output of the computation (an algebra I) every time I wanted to use it so I saved using:

save(I,'os7_6x1_c',compress=True)

Then when I go to load it, it takes longer to load than to compute:

%%time
load(I,'os7_6x1_c.sobj',compress=True)

which results in:

CPU times: user 8min 40s, sys: 35 s, total: 9min 15s
Wall time: 10min 2s

I would not expect that it should take longer to load than to compute. Am I doing something wrong here? Does anyone see a way to make this loading go faster?

edit retag flag offensive close merge delete