Re: Compiling
- To: mathgroup@smc.vnet.net
- Subject: [mg11254] Re: Compiling
- From: Paul Abbott <paul@physics.uwa.edu.au>
- Date: Wed, 4 Mar 1998 01:39:15 -0500
- Organization: University of Western Australia
- References: <6d0cod$2o6@smc.vnet.net>
JOHN C ERB wrote: > I am trying to compile an interpolation routine which is used thousands > of times in my program > > alaway is a 2D table of data {{x1,y1,data1},{x2,y2,data2} ... } > > h is an array of data; e.g. h = {{1,2},{2,3,} ... }, representing x's & > y's for which I want data's; this array has 1000's of entries > > I can use > > Map[Interpolation[alaway][#[[1]],#[[2]]]&,h] > > and get an answer, but it takes several minutes to complete. Using Apply[Interpolation[alaway],h,1] is about 10 times faster. Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul@physics.uwa.edu.au AUSTRALIA http://www.pd.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________