MathGroup Archive 1998

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

Search the Archive

Re: Int.

  • To: mathgroup at
  • Subject: [mg13165] Re: [mg13066] Int.
  • From: Sean Ross <seanross at>
  • Date: Mon, 13 Jul 1998 07:42:15 -0400
  • References: <>
  • Sender: owner-wri-mathgroup at

phpcp at 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.

  • References:
    • Int.
      • From:
  • 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