$ show ecraven/r7rs-benchmarks
This repository is a comprehensive, cross-implementation benchmark suite for R7RS Scheme. It provides a standardized harness that compiles and runs approximately 50 benchmarks (covering numerical, symbolic, I/O, GC, and meta-circular workloads) across more than 30 Scheme implementations, capturing execution times and correctness results. The suite exposes portability gaps, performance differences, and implementation bugs through its per-implementation prelude/postlude system, which adapts the common benchmark code to each Scheme's dialect. Results are output as CSV files and aggregated into summary tables and HTML charts (via graph-gmean.scm and graph.scm). While the benchmarks are well-structured and the harness is robust, many implementations are broken or incomplete, preludes are fragile workarounds, and the codebase shows age-related drift (e.g., deprecated APIs, hardcoded paths, and inputs too small for modern hardware).
The LLM identified 4 files worth highlighting for reuse:
Defines run-r7rs-benchmark, a generic procedure that executes a thunk multiple times, compares the result against an expected value, and outputs a CSV line with timing data. Also provides the `hide` pattern to prevent compiler optimizations from eliminating dead code. This is a self-contained, reusable core for any Scheme benchmarking effort.
Reads the aggregated all.csv file, computes geometric mean and standard deviation for each implementation across all benchmarks, and invokes gnuplot to generate bar charts. Reusable for any performance CSV dataset with columns for implementation, benchmark, and time.
A self-contained HTML report generator that parses all.csv and produces interactive pages with benchmark rankings, fastest times, completion counts, and error summaries. Uses SXML and SRFI-69 hash tables. Reusable for any benchmark result analysis that outputs CSV.
A portable, purely functional macro expander for R5RS Scheme with support for syntax-rules, let-syntax, letrec-syntax, and quasiquote. Can be used programmatically via expand-program or interactively via a REPL. Demonstrates high craftsmanship in hygienic macro expansion and is reusable as a standalone library.