Re: Bigger array taking less memory than smaller array
- To: mathgroup at smc.vnet.net
- Subject: [mg27264] Re: [mg27210] Bigger array taking less memory than smaller array
- From: vze295bp at verizon.net (David Reiss)
- Date: Wed, 14 Feb 2001 03:41:33 -0500 (EST)
- Organization: Scientific Arts
- References: <200102120820.DAA03778@smc.vnet.net> <96asj4$6fl@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
This is not disturbing, but rather a controllable feature.
It is associated with the threshold for changing
a list of fixed type in=to a packed array.
It can be controlled through Developer` context functions.
Specifically you can use the Developer` context function
SetSystemOptions to control this behavior. (And you can see the
set of system options by executing SystemOptions[]
after loading the Developer` context.)
Here is your example before and after changing the
system option for "ArrayCompileLength":
In[1]:=
<< Developer`
In[2]:=
ByteCount[Array[0 &, 200]]
Out[2]=
3220
In[3]:=
ByteCount[Array[0 &, 300]]
Out[3]=
1252
In[4]:=
ByteCount[Array[0 &, 1000]]
Out[4]=
4052
In[5]:=
SetSystemOptions["ArrayCompileLength" -> 500]
Out[5]=
"ArrayCompileLength" -> 500
In[6]:=
ByteCount[Array[0 &, 200]]
Out[6]=
3220
In[7]:=
ByteCount[Array[0 &, 300]]
Out[7]=
4820
In[8]:=
ByteCount[Array[0 &, 1000]]
Out[8]=
4052
In article <96asj4$6fl at smc.vnet.net>, Tomas Garza
<tgarza01 at prodigy.net.mx> wrote:
> Even more disturbing:
>
> In[1]:=
> ByteCount[Array[0 &, 200]]
> Out[1]=
> 4024
>
> In[2]:=
> ByteCount[Array[0 &, 300]]
> Out[2]=
> 1256
>
> In[3]:=
> ByteCount[Array[0 &, 1000]]
> Out[3]=
> 4056
>
> I hope someone can offer an explanation...
>
> Tomas Garza
> Mexico City
> ----- Original Message -----
> From: <Sebastien.deMentendeHorne at electrabel.com>
To: mathgroup at smc.vnet.net
> Subject: [mg27264] [mg27210] Bigger array taking less memory than smaller array
>
>
> > 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
> >
--
) Scientific Arts: http://www.scientificarts.com
) Creative Services and Consultation for the Applied
) and Pure Sciences:: David Reiss: dreiss at !SPAMscientificarts.com
) [Remove the !SPAM to send email]
- References:
- Bigger array taking less memory than smaller array
- From: Sebastien.deMentendeHorne@electrabel.com
- Bigger array taking less memory than smaller array