note
LanX
Why?<P>
<I>> firstly array max is 40 - 41 KB which is pushed beyond then </I><P>
I doubt you measured it right, but <c>$#array=40000</c> will expand an empty <C>@array</C> to 40001 slots. (well actually even more). <P>
But I doubt it'll allocate space for the included scalars ...(?)<P>
<H5> update</H5><P>
see also [HTTPs://stackoverflow.com/questions/36775922/what-is-the-use-of-preallocating-memory-for-an-array-in-perl]<P>
40 KB doesn't qualify as "large" in my book.<P>
<div class="pmsig"><div class="pmsig-708738">
<!--nowiki--><p>Cheers Rolf<br>
<sub>(addicted to the Perl Programming Language :)
<br> <i> [id://1153804|Wikisyntax for the Monastery]</i>
</sub>
<!--nowiki-->
</div></div><!-- Wiki2Monks {"version":1.161} -->
11139338
11139338