Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Slowdown

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53220] Slowdown
  • From: Maxim <ab_def at prontomail.com>
  • Date: Fri, 31 Dec 2004 03:47:44 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Consider:

In[1]:=
Module[{f, L},
   L = f[];
   Do[L = f[L, i], {i, 10^4}]
] // Timing

Module[{weirdness, L},
   L = weirdness[];
   Do[L = weirdness[L, i], {i, 10^4}]
] // Timing

Out[1]=
{0.015*Second, Null}

Out[2]=
{3.063*Second, Null}

Here the timings differ by a factor of 200. Besides, the timing grows  
linearly in the first case and quadratically in the second (therefore, for  
n=10^5 there will be an approximately 2000 times slowdown). We can only  
guess that something goes wrong with the symbol name hashing.

Maxim Rytin
m.r at inbox.ru


  • Prev by Date: RE: DelaunayTriangulation
  • Next by Date: Re: rotating 3D graphic by the mouse
  • Previous by thread: RealTime3D