iForth
A commercial, optimizing Forth compiler for x86 by Marcel Hendrix, descended from the transputer-based tForth and shipped with thousands of examples.
Created by Marcel Hendrix
iForth is a commercial, optimizing Forth compiler for x86 systems, written and maintained by Dutch engineer Marcel Hendrix. It compiles Forth directly to native machine code and is distributed with a very large collection of examples, libraries, and benchmarks. Where many Forth systems aim for minimalism, iForth is unusual in pairing the classic stack-based Forth model with a substantial, batteries-included environment for numerical work, OS integration, and experimentation.
History & Origins
iForth’s lineage runs through tForth, a parallel Forth for the INMOS transputer developed in the mid-1990s by a group that called itself the Dutch Transputer Forth Workshop. As tForth gained the ability to metacompile itself, its authors produced a first experimental port to mainstream hardware: a 32-bit protected-mode Forth for the Intel 386 (with 387 coprocessor) and 486 chips. That port became iForth.
The two systems shared most of their source code, differing mainly in their hardware-specific kernels. According to the tForth project’s own write-up, both ran the same large set of examples, benchmarks, and utilities — at the time, more than two megabytes of text files.
A note on dates: Some sources list iForth’s first appearance as the early 1990s, but the most clearly verifiable anchor is the copyright year of 1996, which coincides with the documented completion of tForth 1.0. The exact year iForth was first usable is best treated as approximate; this page uses 1996 as the earliest well-supported date.
Design Philosophy
Like all Forths, iForth is built on a few simple, powerful ideas:
- The stack is the interface. Words (Forth’s term for functions) take their arguments from a data stack and leave results there, using reverse Polish notation.
- The language extends itself. New words are defined in terms of existing words, with no hard distinction between built-in and user-defined operations.
- Interactivity first. Code can be typed in and executed immediately, encouraging incremental development.
Where iForth distinguishes itself is in ambition of implementation. Rather than the tiny, threaded-code interpreters common in the Forth world, iForth is a native-code compiler with optimization, high-precision floating point, and a rich standard library. It aims to reasonably track the Forth 200x standardization effort while remaining a practical, production-quality tool.
Key Features
Native-code, optimizing compilation
iForth compiles to native x86 machine code rather than interpreting threaded code. Even an early version, with a deliberately simpler optimization strategy than tForth’s, showed strong results: per the project’s own comparison, iForth on a 33 MHz 386 ran roughly three times faster than tForth on a 25 MHz T800 transputer. This is a single historical, author-reported comparison across very different hardware, so it should be read as illustrative of the implementation’s efficiency rather than as a general benchmark.
High-precision floating point
From version 4.0 onward, iForth uses 80-bit internal floating point (the x87 extended-precision format), a step up from the 64-bit floats of earlier versions. Combined with its numerical libraries, this makes it well suited to scientific and engineering calculation.
A large, example-rich distribution
iForth is known for shipping with an enormous body of example and documentation files — its author describes the collection as numbering in the tens of thousands. The distribution includes mathematical libraries, benchmarks, and integrations with external tools such as GNUPLOT and chess front-ends.
Operating-system integration
iForth provides access to OS-level facilities including pipes and sockets, allowing Forth programs to interoperate with other processes and tools rather than running in isolation.
A Taste of iForth (Standard Forth)
iForth programs are written in standard Forth. The following illustrate the model that iForth shares with other Forth systems:
| |
| |
| |
Evolution
iForth’s public version history is well documented through community announcements:
| Version | Approx. date | Notes |
|---|---|---|
| iForth (386/486) | mid-1990s | Initial 32-bit protected-mode port from tForth |
| iForth32 3.0 | May 2008 | Announced as the final 32-bit release |
| iForth v4.0 | October 2009 | First 32/64-bit release; 80-bit internal floats |
| iForth 6.0 | offered as of 2024 | Described as the second 64-bit release |
Across these releases, iForth has been documented as running on Windows, Linux (32- and 64-bit x86), and Intel-based macOS. Support for other operating systems or processor architectures should not be assumed without consulting the current official documentation.
Current Relevance
iForth remains an actively maintained, commercial product. Its author’s site was last updated in 2024 and offers iForth 6.0 for purchase and download. In a Forth ecosystem dominated by free implementations like Gforth and various microcontroller-targeted systems, iForth occupies a distinctive niche: a heavyweight, optimizing, example-laden x86 Forth, maintained over three decades by a single dedicated developer.
Why It Matters
iForth is a case study in taking Forth’s minimalist core and building something large and practical on top of it. Its transputer-era origins tie it to an interesting chapter of parallel-computing history, and its long, careful evolution — from a 386 experiment to a 64-bit, high-precision compiler — shows how a niche language implementation can stay relevant and runnable on modern machines. For anyone studying real-world Forth or the engineering of native-code compilers for stack languages, iForth and its vast example corpus are a notable resource.
Timeline
Notable Uses & Legacy
Numerical and scientific computing
iForth ships with an extensive library of mathematical and numerical examples, including FFT, LINPACK-style linear algebra, and matrix multiplication, and uses 80-bit internal floating point for high-precision arithmetic.
Benchmarking and compiler research
The system includes a large suite of benchmarks (such as NSIEVE and a 105-test 'monster' benchmark) used to study optimizing native-code generation for Forth on x86.
Systems and OS integration
iForth exposes operating-system facilities such as pipes and sockets and has been used to interface with external tools, including GNUPLOT for plotting and Winboard-compatible chess engines.
Example-driven Forth learning
iForth is distributed with thousands of worked examples and utility files (described by its author as numbering in the tens of thousands), making it a large reference corpus for studying practical Forth programming.