MathGroup Archive 2001

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

Search the Archive

Re: Lists and speed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30159] Re: Lists and speed
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 1 Aug 2001 02:19:14 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9k5qp5$ha6$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,


> About a month ago I submitted a question about lists  and received some
> very useful help (summarised below). However, although my program (a
> coupled map lattice for population dynamics) now works well with Ted
> Ersek's modifications, it still takes over 20 minutes (compared to the
> original 40 minutes) to run.
> A colleague has just coded the same thing in another system, which runs in around 40 _seconds_...is this unusual?

It depends. Mathematica is a *computer algebra* it can do things that
you can't do with "another system". *That* is it's strength.
Numerics is only useful, if you have a hybrid algorithm that use
a lot of symbolic computation to give you a final numeric answer.


I'm usual try an numeric algorithm in Mathematica. But when I found
a solution that works I switch to C.  The convenient programming in
Mathematica make it slow, thats why you get quickly a working program
but you have to spend a lot of time to get a quick program.


> I was happy to trade-off speed for faster development time compared to
> Pascal etc, but the difference here seems so huge that I'm concerned that
> my Mathematica programming is still way-off.

A "quick and dirty" program is a "quick and dirty" program in *any*
language. The program/ algorithm is not modifyed by the programming
language. Mathematica has many "fine details" unusual to a C/FORTRAN
programmer. That make it difficult to switch you thinking from
imperative/procedural/object oriented programming to the functional
style of Mathematica. If you try a procedual style in Mathematica
it *must* be slow.

Regards
  Jens


  • Prev by Date: Re: non-linear regression
  • Next by Date: Re: Solving linear equations with symbolic RHS
  • Previous by thread: Re: non-linear regression
  • Next by thread: Re: Lists and speed