points by jan_m_savage 2 days ago | 0 comments
That’s because Gforth is a threaded-code VM that saves dictionary images rather than compiling to native code.
As you prolly know, Forth blurs compile time and run time in general, and there’s no so-called clean compile, then link boundary like in C.
SwiftForth, VFX Forth, and iForth do emit real executables, and there are smaller native-code Forths for Linux too, but then the opportunity cost is losing Gforth’s portability and its standards-heavy library ecosystem.
That's not correct. Gforth features a JIT compiler, although they don't call it that, they call it dynamic superinstructions. It will be enabled if you run gforth-fast. If I understand correctly, the native code sequences are always generated at runtime, and cannot be baked into an image file.
• Dynamic Superinstructions https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Dyn...
• [PDF] Code-Copying Compilation in Production An Experience Report (2025) http://www.euroforth.org/ef25/papers/ertl.pdf