GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ferth/benches at main · benwebber/ferth

Expand file tree

/

benches

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

benches

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
countdown.fth
countdown.fth
 
 
countdown.lua
countdown.lua
 
 
crc32.fth
crc32.fth
 
 
crc32.lua
crc32.lua
 
 
deepchain.fth
deepchain.fth
 
 
deepchain.lua
deepchain.lua
 
 
fib.fth
fib.fth
 
 
fib.lua
fib.lua
 
 
forth.rs
forth.rs
 
 
lua.rs
lua.rs
 
 
rangesum.fth
rangesum.fth
 
 
rangesum.lua
rangesum.lua
 
 
sieve.fth
sieve.fth
 
 
sieve.lua
sieve.lua
 
 

README.md

Outline

Benchmarks

Benchmarks run against both Forth (ferth) and Lua (mlua) for comparison.

fib(20)

Calculates the 20th Fibonacci number with the naive recursive algorithm.

Exercises tree recursion and branching. Neither recursive call is a tail call.

rangesum(1m)

Sums integers 0 to 999 999 using a counted loop.

Measures loop overhead (do/loop/i) independently of recursion.

sieve(100)

Count prime numbers up to and including 100 using the sieve of Eratosthenes.

Exercises memory access and many different control flow words.

deepchain

A deeply nested call chain.

Measures call and return cost in isolation. The entry point expands to a call chain five levels deep.

countdown(60)

Count down from 60 recursively.

A simple recursive algorithm that benefits from tail call optimization.

crc32(4k)

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.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.