Sujet : Re: Parsing timestamps?
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 02. Jul 2025, 17:41:44
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2025Jul2.184144@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : xrn 10.11
Paul Rubin <
no.email@nospam.invalid> writes:
Forth was designed for threaded interpreter implementation and the whole
notion of an optimizing Forth compiler is at best an abstraction
inversion.
Looking at <
https://en.wikipedia.org/wiki/Abstraction_inversion>, I
don't see that at all. Or if it is, it's at least as bad for
optimizing compilers for other languages. I cannot invoke any innards
of C optimizing compilers, whereas in Forth we at least have LITERAL
COMPILE, etc. to generate code. In Gforth (development version) you
also can invoke SET-OPTIMIZER to specify how a given word is
optimized.
But, supposedly, VFX compiler output runs 10x as fast as
the same code under an interpreter.
You can see some data in Figure 1 of
<
https://www.complang.tuwien.ac.at/papers/ertl24-interpreter-speed.pdf>
I think in the Moore era, you got two speedups: 1) interpreted Forth was
10x faster than its main competitor, interpreted BASIC
Not sure what you mean with Moore era; he has been active for many
decades.
Maybe on home computers, Forth's main competitor was interpreted
BASIC, but in the environment where Moore discovered Forth
(minicomputers like the IBM 1130 and the PDP-11), it wasn't. If you
read up on the history of Forth, BASIC is not even mentioned. Fortran
and Algol are.
So I don't see much legitimate complaint about slowdowns due to Forth
locals. The objection is based on other considerations, either
legitimate ones that I don't yet understand, or essentially bogus ones
that I don't completely see through.
Those who have a Forth system that implements locals don't object to
the use of locals, those whose Forth system does not implement them,
do. Looks like the objections are sour-grapes arguments.
- anton
-- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.htmlcomp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/EuroForth 2023 proceedings: http://www.euroforth.org/ef23/papers/EuroForth 2024 proceedings:
http://www.euroforth.org/ef24/papers/