Growing arrays

BlitzMax Forums/BlitzMax Programming/Growing arrays

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I only ask because I have a hell of a lot of code that goes by the length of an array.

for i = 0 to len(<array>)-1

next


So it seems that not slicing right away would result in wasted cpu cycles, not to mention my arrays are re-indexed after being sliced (when a player logs off on index 4 when there are 20 indices, everything is re-indexed to optimize loops..including the sockets/streams).
So slicing more than 1 at a time would also cause a minor spike at run-time right? Maybe defeating the purpose and causing a freeze-up anyways.

I'm not arguing with Dreamora's comment. Instead I would just like to discuss this more so I can understand the best solution in different situations.

As for increasing the starting array for users...that wouldn't be a problem, but these users also create several projects, multiplayer sessions, resize maps, create new entities, etc. This project is a multi-user game development network, not an online game.

Any more input on this delayed slicing is appreciated.