Re: Spreadsheet on Eu
- Posted by petelomax Sep 22, 2020
- 1087 views
Does the interpreter create the whole structure of 16K columns and 2M Rows when I declare the sequence? Or is the structure created on demand when I put data inside?
No and yes. As-is, that program will require 8MB+128K. It would need at least 32GB if you populated every cell (more if cells are not integer).
Here, the width is more critical than the depth. Unused lines will never waste more than 8MB, whereas if you only need 1000 columns, each line you do populate will waste 60K, which could amount to 30GB of the 32GB just mentioned.
The numbers given are for 32-bit, double them for 64-bit.
Since "" is a reference whereas 0 is not, using 0 for unpopulated cells could make your program significantly faster (but obviously the difference is neglible for the example given).
Pete