MathGroup Archive 2003

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

Search the Archive

Re: Curious Timing Results

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38668] Re: Curious Timing Results
  • From: Chris Grant <grant at math.byu.edu>
  • Date: Sat, 4 Jan 2003 07:25:55 -0500 (EST)
  • Organization: Brigham Young University
  • References: <av36rc$g08$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks to those that pointed out that 

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

creates a Packed Array but

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

doesn't.  The Mathematica documentation says:

"When appropriate, large lists and nested lists of numbers are
automatically stored as packed arrays of machine-sized integers
or real numbers."

Does anyone know anymore details about what Mathematica considers
"appropriate" in this context?  When fine-tuning code for
efficiency, it would be nice to be able to predict what data
structures Mathematica is creating.


  • Prev by Date: PolynomialReduce
  • Next by Date: Re: Curious Timing Results
  • Previous by thread: Curious Timing Results
  • Next by thread: Re: Curious Timing Results