Liste des Groupes | Revenir à cl forth |
On 13/09/2024 5:56 pm, minforth wrote:On Thu, 12 Sep 2024 23:37:29 +0000, dxf wrote:>
>On 12/09/2024 8:19 pm, Anton Ertl wrote:>Register allocation is one of the most effective optimizations in>
compilers. That's also true of Forth.
>Costs multiply in the face of many small functions.>
Register allocation is also effective for small functions.
Moore talked about registers. It's worth repeating for those who may be
new
to forth.
>
"But such registers raises the question of local variables. There is a
lot of
discussion about local variables. That is another aspect of your
application
where you can save 100% of the code. I remain adamant that local
variables
are not only useless, they are harmful. If you are writing code that
needs
them you are writing, non-optimal code" - Chuck Moore 1999
The only thing that can be deduced from this is that back in 1999
this was Moore's opinion in the specific context of his work.
>
Besides, the world has changed a wee bit since then...
Claims made in respect of locals in forth - ease of use, better performance
through less 'stack juggling', better readability/maintainability - were all
made in the 1980's. What has changed? Forthers today are more willing to
believe, to accept the word of authority, lack the interest to discover the
truth for themselves? If so, that would be a pity.
Les messages affichés proviennent d'usenet.