Sujet : Re: Actually... why not?
De : zbigniew2011 (at) *nospam* gmail.com (LIT)
Groupes : comp.lang.forthDate : 12. Jun 2025, 12:20:31
Autres entêtes
Organisation : novaBBS
Message-ID : <d2485338579253517484b0dcfead433f@www.novabbs.com>
References : 1 2 3 4
User-Agent : Rocksolid Light
It only requires a change to COMPILE,. No change in INTERPRET.
I modified the relevant branch of INTERPRET.
So throughout
all these years since 70s FORTH could execute
the programs significantly faster - but they
were all the time selling/giving away the listings
that DIDN'T feature such advantageous change?
>
In the 1970s and early 1980s the bigger problem was code size rather
than code performance. And if you compile a variable or constant into
the CFA of the variable, this costs one cell, whereas compiling it
into LIT followed by the address or value costs two cells.
Please, have a mercy... :D it's A SINGLE cell you're
talking about. Even, if (let's assume) the two bytes
may(?) have some meaning during 70s, still in the 80s -
in the era, when 16 KB of RAM, and soon later 64 KB
became de facto standard - it wasn't sane decision(?)
to cripple the compiler(s) by "saving" (literally)
a few bytes.
And even today the compiler creators don't apply
it, for no particular reason?
>
Which compiler creators do you have in mind? Those that compile for
MS-DOS? With 64KB segments, they may prefer to be stingy with the
code size.
64 KB is a whole lot compared to "savings"
of (literally) two-byte size per VARIABLE/CONSTANT
definition. Say we've got 200 of them together
in the program — so 400 bytes has been "saved"
at a cost of significantly degraded performance.
--