MathGroup Archive 2001

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

Search the Archive

Re: Bigger array taking less memory than smaller array

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27232] Re: Bigger array taking less memory than smaller array
  • From: Albert Retey <albert.retey at visualanalysis.com>
  • Date: Tue, 13 Feb 2001 03:35:40 -0500 (EST)
  • Organization: Visual Analysis
  • References: <9686h9$3ps@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Sebastien.deMentendeHorne at electrabel.com wrote:
> 
> Hi,
> 
> This example disturbs me...
> 
>         In[233]:=
>         ByteCount[Array[0 &, {20, 10}]]
> 
>         Out[233]=
>         4424
> 
>         In[234]:=
>         ByteCount[Array[0 &, {30, 10}]]
> 
>         Out[234]=
>         1260
> 
> Some considerations about this ?
> 
> Sébastien de Menten de Horne      |    ELECTRABEL
> Tel:  ++32 10 48 51 76            |    R&D Energy Markets,
> Fax:  ++32 10 48 51 09            |    Traverse d'Esope, 6
> Gsm:  ++32 478 789 444            |    B-1348 Louvain-la-Neuve, BELGIUM
Hi Sebastien,

There is a special way of organizing large Arrays of purely numerical
arrays in 
Mathematica, called PackedArrays, you can learn a little about them in
the online help (AdditionalFunctions/DeveloperContext/Lists and
Matrices) although the documentation is not very extensive...

Developer`PackedArrayQ[Array[0 &, {20, 10}]]

False

Developer`PackedArrayQ[Array[0 &, {30, 10}]]

True

Albert
--
Visual Analysis AG       Internet: www.visualanalysis.com
Neumarkter Str. 87       Telefon: 089 / 431 981 36        
D-81673 Muenchen         Telefax: 089 / 431 981 1


  • Prev by Date: Complicated Rotation
  • Next by Date: Re: Mathematica can talk!
  • Previous by thread: Re: Bigger array taking less memory than smaller array
  • Next by thread: Re: Bigger array taking less memory than smaller array