MathGroup Archive 1998

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

Search the Archive

Re: Int.


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.


  • Prev by Date: nlim error message using an NIntegrate function in Plot[]
  • Next by Date: 3DGraphics color problem
  • Previous by thread: Int.
  • Next by thread: programming in Mathematica