On Tue, May 29, 2018 at 5:13 AM Jeffrey Birt <bir...@soigeneris.com> wrote:

> >>> Anytime a new scalar (i.e. non-array) variable is created, the
> addresses of the array variables must all change to make room for the new
> scalar variable.
>
>
>
> So BASIC copies all the arrays to a new memory address? That does not seem
> very efficient.
>
>
>
> Jeff
>
>
>

I think it’s a trade off. Extra levels of indirection are also inefficient.

It’s either take the hit on a “move” when a variable is created  or take a
guaranteed hit every variable access.

And you can avoid the cost by declaring your variables up front.

— John.

Reply via email to