# R7RS benchmark workloads This imports **56 workloads** from [ecraven/r7rs-benchmarks](https://github.com/ecraven/r7rs-benchmarks/tree/85f6acdc4cc4e2b857f307ba56bd0ba931dcccd1/src), pinned at `85f6acdc4cc4e2b857f307ba56bd0ba931dcccd1`. The Scheme workloads, `hide` helper, input sizes, result predicates and data fixtures are unmodified. To install this optional suite, clone the upstream repository, check out the pinned revision, and run the importer from the Vile source directory. ```sh git clone https://github.com/ecraven/r7rs-benchmarks.git ../r7rs-benchmarks git -C ../r7rs-benchmarks checkout --detach 85f6acdc4cc4e2b857f307ba56bd0ba931dcccd1 python3 bench/r7rs/import_upstream.py ../r7rs-benchmarks ``` The importer keeps the original notices and writes the file hashes and provenance under `bench/r7rs/upstream/`. Two existing workloads are omitted: | Upstream | Existing workload | Reason | |---|---|---| | `fib` | [fib-20](../native/fib-20.scm) | Same naive exact-integer Fibonacci kernel, at a different input size. | | `sum` | [tail-sum-10k](../native/tail-sum-10k.scm) | Same descending exact-integer summation kernel. | `fibfp`, `fibc` and `sumfp` remain because inexact arithmetic and continuations exercise different paths. Vector copying, string growth, UTF-8 conversion, list-based division and file reading also differ from the existing microbenchmarks. [cases.json](cases.json) lists every inclusion and omission. The unfinished upstream `read0` workload is included and labelled; upstream excludes it from its usual list. Implementation preludes and utilities are not workloads. The [compatibility report](COMPATIBILITY.md) records all 56 workloads across interpreted Vile, native Vile and Guile 3. Both Vile drivers and all 56 Guile wrappers built successfully. With one repetition, original input sizes, a 30-second limit and a 1024 MiB RSS limit, 134 of 168 runs passed; 31 reached a resource limit and three failed on the unfinished `read0` workload. All results are retained. A separate three-workload timing/report smoke passed all 27 runs; it is not a full-suite performance comparison. List cases from the checkout: ```sh python3 bench/r7rs/compare.py list python3 bench/r7rs/test_catalog.py ``` Run one build, verification or measurement job at a time on macOS. The runner locks `~/.cache/vile/mac-validation.lock` by default. Use `--lock-file PATH` to coordinate with other validation tools on the same host. Work from a hash-verified snapshot containing this directory and the runtime. The comparison runner verifies its `SHA256SUMS` before and after each phase. Set `VEXE`, `GUILE` and `GUILD` to the verified compiler and Guile 3 executables. From that snapshot, run separate phases: ```sh python3 bench/r7rs/compare.py build --output r7rs-results-v1 python3 bench/r7rs/compare.py verify --output r7rs-results-v1 --iterations 1 python3 bench/r7rs/compare.py measure --output r7rs-results-v1 --samples 9 python3 bench/r7rs/compare.py report --output r7rs-results-v1 ``` When a snapshot launcher already holds the shared lock, pass `--lock-held` to the child runner. All subprocesses use `VJOBS=1`, `VFLAGS=-no-parallel` and `MAKEFLAGS=-j1`. The runner compares interpreted Vile with GC, native Vile with GC, and Guile 3 with the upstream Guile prelude and `guild -O2` compilation. It keeps Guile's default JIT settings. Allocation-heavy cases use the collector; an arena-only variant is not part of this suite's default comparison. `--cases ack array1` restricts a run. `--iterations 1` changes only the first input repetition datum, preserving comments, sizes and expected results. This also applies to the commented `mperm` input, whose `M` is passed to the harness as its repetition count. Without this option the original upstream counts apply. The effective stdin hash and settings are recorded. Each fresh process gets private copies of the input fixtures and a private output directory. File copies happen before execution and can warm the OS file cache; these are not cold-storage I/O measurements. Both runtimes collect before starting the benchmark call. The unmodified upstream harness times the repeated thunk and checks its final result. It reports first-use execution, including native compilation within that loop; `VILE_NATIVE_CACHE=off` is explicit and native compilation/deoptimization counters are retained. These results remain separate from the existing 36-workload suite's prepared timings and four-input independent oracles. They must not be silently combined into its aggregate. Default limits are 300 seconds and 1024 MiB of sampled process-tree RSS per process; adjust `--timeout` and `--rss-limit-mb` explicitly. Only the runner's own process group is terminated at a limit. RSS is sampled every 200 ms, so the reported peak is a sampled lower bound and counts shared pages per process. Output is bounded at 64 MiB. Measurement cases wait for at least 90% idle CPU. Build, verify and measurement checkpoints preserve completed observations. A zero process exit does not imply correctness: `INCORRECT`, missing results, malformed times and internal `Failed` diagnostics fail validation. Compile and runtime errors, memory limits and timeouts remain visible in the raw records; verification exits unsuccessfully if any case fails. Reports require every requested observation and retain failed cases. Upstream predicates have varying strength; this imports those predicates rather than claiming independent oracles.