BASIC does not separate program instructions and program data into two separate address spaces, as machine code can do on some processor architectures.
Instead, data are embedded into a program with DATA statements.
The BASIC interpreter effectively maintains two pointers into a program, the instruction pointer and the data pointer.
The former is set up by RUN and advances as BASIC statements are executed; with DATA statements doing nothing when executed.
The latter is set up by RUN, rewound by RESTORE, advances as READ statements are executed, and skips everything except DATA statements; at which point they are actually executed to evaluate their data.
It is possible to accidentally make this very inefficient, or even error‐prone; by simple dint of putting all of the DATA at the end of the program.
It is inefficient, because the first read after RUN or RESTORE has to scan the data pointer through almost all of the (tokenized) program in memory to find the first DATA statement.
It can be error‐prone because that scan relies on program code being syntactically correct up to the DATA areas.
It has to parse the program at least enough to find where statement boundaries are.
The instruction pointer does not need the whole program to be syntactically correct, only those parts that it ends up executing.
The data pointer, however, constrains the entire program; because it scans from the beginning, through all of the DATA, to the end when it detects that it is out of DATA.
There are two very simple strategies to ameliorate these problems:
Put the DATA statements at the start of the program, before the instructions.
For maximum effect, immediately precede them with just a GOTO that skips over them.
A GOTO with a line number does not scan the instruction pointer through all of the DATA statements.
Lines are indexed by their line numbers (if they have them) and GOTO points the instruction pointer to them directly.
Give the (starting) DATA line numbers, and give those line numbers to RESTORE.
A RESTORE with a line number likewise can use the line number index to place the starting data pointer directly at the start of the (chosen) DATA.