[Date Index] [Thread Index] [Author Index]
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.