Benchmarks run against both Forth (ferth) and Lua (mlua) for comparison.
Calculates the 20th Fibonacci number with the naive recursive algorithm.
Exercises tree recursion and branching. Neither recursive call is a tail call.
Sums integers 0 to 999 999 using a counted loop.
Measures loop overhead (do/loop/i) independently of recursion.
Count prime numbers up to and including 100 using the sieve of Eratosthenes.
Exercises memory access and many different control flow words.
A deeply nested call chain.
Measures call and return cost in isolation. The entry point expands to a call chain five levels deep.
Count down from 60 recursively.
A simple recursive algorithm that benefits from tail call optimization.
CRC-32/ISO-HDLC over a 4 KiB buffer.
Exercises memory access, bitwise operations, and nested loops. The inner loop runs exactly 8 times per byte, so branch behaviour is uniform.