Claude Mourier 00 makes some magical things to make me read

} SBasic compilers always were (are) for me a mystery on SMS : TT told me
} there is no gain compiling a SB program except the size in ram (because
} there are two versions of source in memory), and in most case I notice it's
} true (when compiling programs on PC gives x5 speed over interpreted). Why ?

Because, smart Tony perform on-the-fly compilation of SB program, or rather
the tokenisation of the program has already been done at load/edit time,
So, it's just like the SB is already compiled. (no need to check the syntax
all the time).

On PC, interpreted code is tokenised for each execution of a loop;
whereas on SMS, it is tokenised the first time you enter the code, and
after that, the result is reused.

The PC approach is too careful (or lack the tokenisation concept): it
is worth only with self-modifying code and self-modifying code is
not possible easily. (In SB, it can be done with some DLINE [but this
as no impact on the tokenised image, only removing instructions] and
with some MERGE [and then the tokenisation process is perform during
the MERGE, hence the existence of thing like QSAVE and QLOAD which
avoid the tokenisation process by saving the tokenised image instead
of the plain text [but which failed to reload on machine with extensions
loaded in differents orders...].)


Reply via email to