MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

DumpSave of InterpolatingFunction increases its execution times

I saved an Interpolating Function with DumpSave. When I load the function, the execution times increase about 10 times in the toy example below (and 100 times in my real calculation).

Can somebody explain why is this happening and how to be avoided? It's important to optimize my calculation.

Toy Example (the execution time went from 0.905 to 6.645s):

In[1]:= ifun=Interpolation[Table[x, {x,0,1,1/100}]]
Out[1]= InterpolatingFunction[{{1,101}},<>]

In[2]:= Timing[Do[ifun[10], {i, 0,1,1/100000}]]
Out[2]= {0.905,Null}

In[3]:= workdir="C:\Users\V\Desktop\simsec";
        DumpSave["dumpsavetest.tst", ifun]
Out[5]= {InterpolatingFunction[{{1,101}},<>]}

In[6]:= Remove["Global`*"](* clear definitions *)
Out[7]= {}

In[8]:= workdir="C:\Users\V\Desktop\simsec";
        <<"dumpsavetest.tst" (*load the calculated data*)
Out[11]= {ifun,workdir}

In[12]:= Timing[Do[ifun[10], {i, 0,1,1/100000}]]
Out[12]= {6.645,Null}

  • Prev by Date: PlotLegend Question
  • Next by Date: Question about Tally on a list of lists
  • Previous by thread: Re: PlotLegend Question
  • Next by thread: Re: DumpSave of InterpolatingFunction increases its execution times