help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Long save and very long load times


From: Dmitri A. Sergatskov
Subject: Re: Long save and very long load times
Date: Fri, 5 Jun 2020 19:43:43 -0400



On Fri, Jun 5, 2020 at 7:27 PM Brett Green <green.brett.r@gmail.com> wrote:
Hello all,

In my code, I need to evaluate several functions across an NxN mesh. My code stores the results of these evaluations in an NxNx4x10 array where I would like N=2000.

In principle, I only need to populate this massive array once, and then I can save it and load it again whenever I need it. However, loading the array is actually slower than just reconstructing it by evaluating the functions at all points on the NxN mesh again. Specifically, evaluating a fast approximation of the functions takes 125s. Saving the resulting array takes 270s, and loading takes 2011s, as determined by tic and toc.

I understand that accessing nonvolatile memory is much slower than RAM, even though I am using an SSD, but is it really this slow or is there something wrong with Octave's loading? Even if it's just the slowness of nonvolatile memory, why is loading an order of magnitude slower than saving?

- Brett Green


You are probably saving it as formatted as ascii. That takes a lot of time. Use binary (or hdf5 or mat)

Dmitri.
--

reply via email to

[Prev in Thread] Current Thread [Next in Thread]