[Coco] Why DECB is important to OS-9 folk.
John R. Hogerhuis
jhoger at pobox.com
Fri Sep 9 17:56:43 EDT 2005
On Fri, 2005-09-09 at 12:18 -0700, Robert Emery wrote:
> If I could make a wish...
> I'd like to see a "hybrid" Basic where we could type in and run programs at
> will and then compile them for the speed and size benefits. I believe this has
> been done, not sure about platform or compatibility.
>
> Bob
>
There are non-negligible size and speed benefits to compiling BASIC
code. But probably not worth hassling with a compiler (BASIC compilers
are usually hacks that place many limitations on what you can do).
Better spending your time optimizing the program than fiddling with
BASIC compilers. For example, replacing loops through data statements
with searching for substrings using INSTR is the kind of thing that will
make the biggest difference whether you are going to compile it or
interpret it. The thing to keep in mind is MS BASIC already does some
"compiling" since it stores all the keywords in your program as a
tokenized format in RAM.
Also, just writing short machine language subroutines for
speed-intensive portions of the code can make a big impact. And simple
stuff like custom screen scrolls, etc. are fairly easy to write
assembly, but they make a big difference in speed.
-- John.
More information about the Coco
mailing list