MathGroup Archive 2001

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

Search the Archive

Re: Bigger array taking less memory than smaller array


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