MathGroup Archive 1998

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

Search the Archive

Re: Compiled programs


Hi Miguel,

at first keep in mind Mathematica is a computer algebra system. Its
power are symbolic computations not numerical ones.

If have written a book about Mathematica & C and I can tell You that the
speed gain is a factor 10 for Mathematica Code to compiled Mathematica
and again a factor of 10 from compiled Mathematica code to a MathLink
program.
The last value depends on the
- ratio of I/O values to operations
- the operating system
- the overhead of the data

Typical I found a speed up of a factor 100 and more when I use a
MathLink program
instead of pure Mathematica code.

If You have to calculate a single function, that takes one value and
returns one value
You can have s slow MathLink program when You only implement x+1,
because the overhead to tansfer the data will eat up all speed, and You
can have a fast MathLink
program when You have to perform some hundered operations with the data.

Hope that helps
  Jens

-----Original Message-----
From: Miguel <migdie at encomix.es>
To: mathgroup at smc.vnet.net
Subject: [mg14147] [mg14111] Compiled programs


>Hi all,
>
>This is the first time I post here.
>I would like to know if anybody has used Mathematica to make a fast
>program as is done in Fortran or C. I have read that the time of
>computation  is similar for  C and Mathematica  when you use compiled
>functions.
>Is this correct or Fortran and C are much faster than Mathematica ? (of
>course it is when you use real number and not infinite precision...)
>This is my big problem with Mathematica: It is too slow !!
>
>Thanks for all,
>Miguel.
>
>Email : migdie at encomix.es
>
>
>



  • Prev by Date: Re: argument passing
  • Next by Date: Re: 3D Object from Listplot?
  • Previous by thread: Compiled programs
  • Next by thread: CALL FOR PARTICIPANTS