Timing anomaly
- To: mathgroup at smc.vnet.net
- Subject: [mg50349] Timing anomaly
- From: koopman at sfu.ca (Ray Koopman)
- Date: Sat, 28 Aug 2004 04:38:02 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Has anyone else noticed a slowdown
in the first call to Timing in a cell?
In[1]:= t := First@Timing@Do[Null,{1*^7}]/($TimeUnit Second)
In[2]:= {t,t,t,t,t} (* the first call is slow *)
Out[2]= {74.,61.,61.,60.,62.}
The next cell contains two input expressions that are entered
simultaneously; only the first call in the first expression is slow.
In[3]:= {t,t,t,t,t}
{t,t,t,t,t}
Out[3]= {74.,61.,61.,60.,61.}
Out[4]= {61.,61.,62.,64.,60.}
In[5]:= Table[t,{10}]
Out[5]= {71.,58.,60.,62.,60.,61.,60.,61.,60.,60.}
The next cell was entered while Table in the previous cell
was still running; the first call is not slow.
In[6]:= {t,t,t,t,t}
Out[6]= {58.,61.,59.,61.,61.}
In[7]:= $Version
Out[7]= 5.0 for Mac OS X (November 19, 2003)