MathGroup Archive 1993

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

Search the Archive

Re: Compile AND Remember

  • To: MATHGROUP at yoda.physics.unc.edu
  • Subject: Re: Compile AND Remember
  • From: GER.XSE0027 at applelink.apple.com (Germany - RL Jakschewitz,Nrnbrg,IDV)
  • Date: 26 Apr 93 22:20 GMT

in message <9304260435.AA28598 at yoda.physics.unc.edu> Simon Chandler writes
 
> f[x_,y_,z_]:= f[x,y,z] = blah blah
  [...]
> Can I combine Compile with the "remembering" of function values ?
> Would this be faster than just using Compile ?
 
The combination seems to be possible only, if you do  it in two steps:
 
In[1]:= fc := Compile[{x,y,z}, blah blah ]
In[2]:= f[x_,y_,z_]:= f[x,y,z] = fc[x,y,z]
 
If only "blah blah" takes long enough to compute, f[a,b,c] called repeatedly
should definitely be faster than calling fc[a,b,c].
 
Roland Jakschewitz
 
------------------------------------------------------------------------
  RL  Jakschewitz
    Geuderstr. 7                       AppleLink:  GER.XSE0027
D-8500 NUERNBERG 20                    Tel:        +49 - 911 - 26 13 13
      Germany                          UUCP:       rlj-nbg at infohh.rmi.de
------------------------------------------------------------------------
 






  • Prev by Date: ISSAC'93
  • Next by Date: re: Sending data to a file
  • Previous by thread: ISSAC'93
  • Next by thread: MathLink to remote Solaris 2.1 host (Q)