4 ms·
Forth is a language that is simple to parse and executed by a virtual machine with a stack, possibly using byte code. However, this is not the type of compilati
by fjfaase 3y ago
Forth is a language that is simple to parse and executed by a virtual machine with a stack, possibly using byte code. However, this is not the type of compilation that the article is talking about. Performing operations on a stack (that can grow deep) is often not as efficient as assembly code that can use several registers to store immediate results.
- zabzonk 3y agoi have written a couple of forth-like languages (which were pretty fast) but i can imagine extending a forth to use registers, if they were available. Also, no virtual machine, at least for a machine code implementation. I wrote a forth like in c++ to implement adventure games, but the first I wrote was in z80 assembler, no vm.