[Date Index] [Thread Index] [Author Index]
Re: DumpSave of InterpolatingFunction increases its execution times
For future references: With DumpSave I found a solution that restores the speed of the interpolation function. In the toy example above, after reading the function from the file, execute the following line: ifun = ifun; and then check the speed is restored. Apparently the problem is that DumpSave saves interpolation functions into some kind of inevaluated form. I am guessing the execution speed decreases because the function undergoes some kind of redefinition every time it is called. The above line kind of fixes the definition once and for all. Mathematica email support told me that indeed DumpSave 'has memory problems with interpolating functions' so they recommended using Save instead. I didn't know Save could save numeric object like interpolation function but it does work and it doesn't lead to any decrease in speed after loading the definition back. Only drawback is that for some reason Save produces enourmous files compared to DumpSave - my guess is that it saves in text format while DumpSave uses internal binary format which is compressed.