What's new

Memory/CPU usage by arrays?

Andrew Aversa

Lead Developer
I'm thinking about implementing some features into a current library that would necessitate maybe 8-9 new arrays, each of which holding 100 cells with numbers between 0 and 5. They would be accessed about once per new note (so not frequently).

I'm not currently having problems with CPU/RAM usage but I don't want to really slow down my script by adding this functionality.

Anyone have any input on what kind of CPU/memory effect those arrays might have simply by existing and being populated?
 
I think compared to the amount of memory samples occupy, a few arrays are rather insignificant. But I have been wrong before...
 
I guess I figured that being simple numbers, they wouldn't take up too much memory per se, but I worry that such large variables could perhaps slow loading times etc?
 
The memory footstamp and loading times of such "small" integer arrays are minimal - but how much it taxes your system is dependant of what you want to do with that array. For example, a search array function costs a lot more CPU cycles than a simple invocation of a single array cell.
 
I wouldn't worry about it if I were you. Even the search array function is very well optimized and runs very fast. In the big scheme of things, the amount of CPU drain relative to all the other stuff going on should be in the noise level. :lol:

Rejoice,

Bob
 
Top Bottom