- To: mathgroup at smc.vnet.net
- Subject: [mg13165] Re: [mg13066] Int.
- From: Sean Ross <seanross at worldnet.att.net>
- Date: Mon, 13 Jul 1998 07:42:15 -0400
- References: <199807042045.QAA02903@smc.vnet.net.>
- Sender: owner-wri-mathgroup at wolfram.com
phpcp at csv.warwick.ac.uk wrote: > > Hi! > > I have a function (Module) for integration using runge-kutta-fehlberg > algorithm. It seems to run very (very, very) slow. How can I make it > faster. What operations take the longest in Mathematica? > > thanks, > Sanjay. Mathematica is at its slowest when you use procedural programming: For, Do, While, Table etc. It is at its fastest when you use functional proogramming: Map, Thread, Through, Apply, Inner etc. If you can rewrite your algorithm to use these kinds of functions you will probably speed up by a factor of 10 or so. After that you can also use the compile function.
- From: firstname.lastname@example.org