MathGroup Archive 2005

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

Search the Archive

Re: Timing of looping operators

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62452] Re: Timing of looping operators
  • From: "Norbert Marxer" <marxer at mec.li>
  • Date: Thu, 24 Nov 2005 06:33:52 -0500 (EST)
  • References: <dm1cum$jp7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Daniel

I think your conclusions about the timings of Map and Do are not
correct, because you use the function "fun" with Map and the undefined
function "f" with Do.

If I use the function "fun" in all three cases I get roughly (note:
even though I restart the Kernel each time I get slightly different
results with every evaluation) the following times: {1.1, 1.3, 1.5}.

If I define "fun" as x^2 I get the following times: {1.1, 3.6, 3.6}.

Therefore I conclude that using Map has advantages over the Do
construct.

Best regards
Norbert Marxer
www.mec.li


  • Prev by Date: Re: NDSolve in 5.2
  • Next by Date: Mathematica, Linux and OpenMosix
  • Previous by thread: Re: Timing of looping operators
  • Next by thread: Re: Timing of looping operators