Question regarding Compile
- To: mathgroup at smc.vnet.net
- Subject: [mg33682] Question regarding Compile
- From: Madhusudan Singh <ar at sc.hc.de>
- Date: Sat, 6 Apr 2002 00:49:01 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I apologise if this question (or something like this) has been asked earlier. I have a slew of functions like : f1[p1_,p2_,p3_]:= <some fn.> f2, f3 similarly defined. f5[x_,y_,z_]:=F(f1[..],f2[..],f3[..],f4[..]); Now, this particular computation proceeds very slowly and I wish to speed it up by compiling my functions. However, the very syntax of Compile indicates that I cannot invoke a Compile'd function and pass arguments to it. For instance, f1=Compile[{p1,p2,p3}, <some expression>] cannot be used in f5 above the way I have been doing. Does this mean that I can only Compile f5 by itself (with all the functions that it depends upon replaced by actual expression) ? If so, the resulting expression for f5 would be quite, quite complicated. A little confused about this. And, yes, I haven't ever Compile'd a Mathematica function. Thanks.