MathGroup Archive 2003

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

Search the Archive

Curious Timing Results

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38651] Curious Timing Results
  • From: Chris Grant <grant at math.byu.edu>
  • Date: Fri, 3 Jan 2003 00:15:25 -0500 (EST)
  • Organization: Brigham Young University
  • Sender: owner-wri-mathgroup at wolfram.com

I find the Timing results below a little curious.  Is there a simple
explanation why I shouldn't?

Chris Grant

In[1]:=  x = Table[2.,{i,100000}];

In[2]:=  y = Table[If[i<1000000,2.,i],{i,100000}];

In[3]:=  SameQ[x,y]

Out[3]=  True

In[4]:=  Timing[Inner[Divide,x,x]]

Out[4]=  {0.44 Second,100000.}

In[5]:=  Timing[Inner[Divide,y,y]]

Out[5]=  {0.321 Second,100000.}


  • Prev by Date: Elliptic Curve Cryptography and Mathematica
  • Next by Date: Re: Solving Alphametics with Mathematica
  • Previous by thread: Elliptic Curve Cryptography and Mathematica
  • Next by thread: Re: Curious Timing Results