MathGroup Archive 2012

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

Search the Archive

Re: non optimized inner for loops

  • To: mathgroup at
  • Subject: [mg128779] Re: non optimized inner for loops
  • From: Peter Klamser <klamser at>
  • Date: Sun, 25 Nov 2012 04:59:30 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <>

Hi Sasa,

questions, improving the performance of the Mathematica code are often posted. Many
people think, that usual approaches will help, if you write c, c++ or
pascal code sometimes combined with the Compile[].

Read a book or join a online course programming in Mathematica by WRI and find out
how to use

l = Table[Sin[x], {x, 0, 10 Pi, 10 Pi/10^6}] // N;
Plus @@ l // Timing

or Select[], /@ and & (pure functions) etc..

The Mathematica help system is also useful if you look for @@ and then open one
item under see also.


2012/11/23 Sasa B <neprihvatljivo at>

> I am aware of more advanced functions and approaches, it is just that I
> don't know how to apply them :)
> If anybody tries to evaluate code above, there is one error, variable d1
> needs to be initialized with, say d1=10.
> thanks

  • Prev by Date: Re: Cannot calculate with Dynamic variables
  • Next by Date: Re: How to use a function "Manipulate" to SmoothHistogram3D
  • Previous by thread: non optimized inner for loops
  • Next by thread: Re: non optimized inner for loops