Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Declaring variables

  • To: mathgroup at
  • Subject: [mg29924] Re: Declaring variables
  • From: Jens-Peer Kuska <kuska at>
  • Date: Thu, 19 Jul 2001 03:56:52 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9j39ic$ijk$>
  • Sender: owner-wri-mathgroup at


there is *no* way to set the type of the value
of a symbol ! Mathematica is an untyped language.

Your statement "x must be a list" is not clear --
what must be a list ? The symbol x or it's value ?

Since Mathematica knows nothing about type definitions
it will not speed up your computation.

For CompiledFunction[] objects you can give types
and tensor degrees.

What will reduce your runtime ? This can't be sayed without
the programming code. A MathLink program will do it, if you just
do numerics. But a general hint is impossible.


Etienne wrote:
> I am trying to speed up a genetic algorithm and was wondering if there is an
> efficient way of declaring variables (e.g. x must be a list). Will it reduce
> my run time? If not, what will?
> Thanks in advance.
> Etienne Ayotte-Sauvé

  • Prev by Date: Re: slow integration
  • Next by Date: Re: Admissible values for variables
  • Previous by thread: Declaring variables
  • Next by thread: Admissible values for variables