Skip to content

Add benchmark harness and compiled evaluator#28

Open
chboishabba wants to merge 1 commit intopimlu:masterfrom
chboishabba:frackdash-bench
Open

Add benchmark harness and compiled evaluator#28
chboishabba wants to merge 1 commit intopimlu:masterfrom
chboishabba:frackdash-bench

Conversation

@chboishabba
Copy link
Copy Markdown

@chboishabba chboishabba commented Mar 25, 2026

This PR adds a deterministic benchmark entrypoint and a compiled evaluator path for FRACTRAN programs.

Changes:

  • add fractran-bench CLI via src/Bench.hs and src/bench_main.hs
  • add compiled exponent-vector evaluator in src/Compiled.hs
  • update build.sh to build both fractran and fractran-bench
  • default to -dynamic builds, while --profile keeps the profiling build path
  • document benchmark usage in README.md
  • ignore benchmark binary and profiling output in .gitignore

Notes:

  • existing demo flow remains available via ./fractran
  • benchmark engines include naive-fast, reg, frac-opt, cycle, compiled, and lut
  • scenarios currently include mult_smoke, primegame_small, primegame_medium, and primegame_large
  • the branch is kept to one commit for review

If you want a shorter version, use:

Adds a benchmark harness and a compiled exponent-vector evaluator.

Summary:

  • new fractran-bench CLI
  • new Compiled.hs evaluator path
  • build.sh now builds both fractran and fractran-bench
  • README updated with benchmark usage
  • .gitignore updated for benchmark/profiling artifacts

This keeps the existing demo binary intact and packages the benchmark work as a single reviewable commit.

This came out of downstream benchmarking work in FRACDASH, but the change set here is kept upstream-focused and self-contained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant