# Mock window-manager benchmark suite Twelve headless workloads exercise an application-shaped Scheme runtime. No display server or OS window manager is required. The same timed definitions, event traces, macros and configuration files run in Vile and Guile 3. The model has 64 client slots, four workspaces, focus selection, tiling/monocle geometry, keymaps, consuming hooks, lifecycle transitions and replaceable policy callbacks. Reload tests retain and invoke an old policy after installing its replacement, exercising closure lifetime as well as loading. | Workload | Timed work per invocation, before seed variation | |---|---| | `wm-callback-chain` | 4,096 events through a captured callback and four nested call layers | | `wm-event-dispatch` | 512 heterogeneous events through an eight-handler table | | `wm-focus-cycle` | 2,048 focus changes, workspace switches and commands | | `wm-tiling-layout` | 48 layout passes across workspace clients | | `wm-workspace-move` | 1,024 client moves, focus repairs and workspace switches | | `wm-keybindings` | 512 key/chord lookups in a macro-defined 32-binding keymap and closure calls | | `wm-hooks` | 1,024 hook deliveries, mutable captured counters and event consumption | | `wm-lifecycle` | 1,024 map/unmap operations, fresh client records and focus repair | | `wm-macro-config` | Eight fresh DSL forms, each expanding/compiling/installing 32 bindings, then invoking them | | `wm-config-load-tree` | Four configuration reloads, each reading a four-file tree and exercising installed callbacks | | `wm-reload-live` | 512 events interleaved with source reloads and calls to old/new policies | | `wm-session-replay` | 256 mixed events with reloads, key dispatch, layouts and hooks | Four seeds vary work counts, targets, policy values and geometry. Every invocation checks a checksum over **all state fields and every client field**, including geometry and dead slots. [model.py](model.py) independently computes expected states using Python dictionaries and named fields; the Scheme model uses vectors and closures. Checksums are exact integers, not timing thresholds. The shared batch cycles all seeds and checks each result before returning a success marker. State/client/keymap creation is included in each timed invocation. Shared helper definitions, macro definitions and per-engine imports/environment handles are prepared outside timing. The macro case explicitly times `eval`, expansion, compilation and installation of changing forms. Loading cases explicitly time source reads, parsing, expansion, compilation and installation. OS filesystem caches are not flushed; these are source-load costs, not uncached-disk claims. Guile compiles the main wrapper with `guild -O2` and uses its default JIT; `GUILE_AUTO_COMPILE=0` keeps fixture loads from silently creating cached `.go` files. Each Guile case has a named module for its configuration environment. Vile uses its interaction environment. This setup is outside timing. Reuse the checked harness and driver: ```sh python3 bench/native/compare.py build --suite wm --samples 9 python3 bench/native/compare.py verify --suite wm --samples 9 # Separate idle-Mac jobs after builds/tests: python3 bench/native/compare.py scaling --suite wm --samples 9 python3 bench/native/compare.py measure --suite wm --samples 9 ``` Run the phases serially on one Mac from a hash-verified snapshot. Set `VJOBS=1`, `VFLAGS=-no-parallel` and `MAKEFLAGS=-j1`. Output defaults to `wm-results-v1/`; use a fresh `--output` when sources change. All phases must use the same flags and sample count. Nine samples are useful for iterations; the default is 31. The five configurations are interpreter/native, each with arena/Boehm, and Guile 3. Native cache is off by default so first calls include compilation; `--native-cache reuse` selects a separate explicit cache experiment. Unsupported native work remains in the comparison. First-call, whole-process and prepared times are separate; a process includes the full batch. The scaling phase checks callback and focus workloads at 4 versus 400 calls to reject eliminated repeated work. Completed jobs and rows resume without restarting successful groups. `python3 bench/wm/catalog.py` regenerates cases and verifies all 48 seed oracles. Source/fixture/tool/binary hashes and raw samples are retained by the harness. The WM suite is reported separately from the numeric/runtime microbenchmarks; neither suite is silently filtered or presented as representative of all programs. The completed nine-sample Mac pilot is in [RESULTS.md](RESULTS.md), with all twelve workloads and all five configurations. The subsequent vector-read optimization is measured against that pilot in [DISPATCH-355.md](../native/DISPATCH-355.md). The subsequent division/vector-write optimization is measured against the vector-read version in [PRIMITIVE-356.md](../native/PRIMITIVE-356.md). The native-vector candidate and its regressions are recorded in [VECTOR-357.md](../native/VECTOR-357.md). Further optimization is pending. The retained native-vector and binding-cache comparison is in [GUARDS-358.md](../native/GUARDS-358.md), including both suites and all losses. The previous native comparison, [BINDINGS-360.md](../native/BINDINGS-360.md), includes all 12 WM and 24 runtime workloads. Existing callback providers and immediate binding helpers improve native GC WM performance 1.88× over retained358; Guile still leads the WM suite by about 3.01×. All workloads, losses, raw first-call results and recovery details remain reported. The staged-capture comparison is [CAPTURES-361.md](../native/CAPTURES-361.md): staged scalar captures improve hooks while the WM aggregate changes by about 1%. The numeric suite gains 1.23× over360; Guile still leads both suites. All 36 workloads and the earlier trial losses are included. The private-loop comparison is [LOOPS-362.md](../native/LOOPS-362.md). Private named loops improve native GC WM performance 1.31× over361 while retaining the earlier counter performance. Guile still leads the WM aggregate by about 2.27×. All 36 workloads, both collectors, earlier trials and remaining losses are reported; the requested 1.5× advantage remains unmet. The borrowed-list comparison is [PAIRS-363.md](../native/PAIRS-363.md). Borrowed integer-list inputs improve the runtime suite 1.10× over362 while the WM aggregate changes by less than 1%. Guile still leads the WM suite by about 2.28×. All 36 workloads, both collectors and losses remain included. The borrowed-bytevector comparison is [BYTES-364.md](../native/BYTES-364.md). Borrowed bytevector operations improve the runtime suite 1.13× over363 while preserving WM performance. Guile still leads the WM aggregate by about 2.28×. All 36 workloads, both collectors and losses remain included. The earlier multiple-value comparison is [VALUES-365.md](../native/VALUES-365.md). Private multiple-value callbacks improve the runtime suite 1.29× over364; WM gain is 1.002×. Guile leads by 2.28× on WM. All 36 workloads, both collectors, correctness gates and losses remain included; the requested full 1.5× advantage remains unmet. The ordinary-interpreter comparison is [FUSION-366.md](../runtime/FUSION-366.md). With native execution disabled, GC WM performance improves 1.086× over365; Guile still leads WM by 5.29×. All 36 workloads and losses remain included alongside the earlier native comparisons. The ordinary-interpreter comparison is [CALLS-367.md](../runtime/CALLS-367.md). With native execution disabled, GC WM performance improves 1.047× over366; Guile still leads WM by 5.04×. All 36 workloads and losses remain included alongside the earlier native comparisons. The ordinary-interpreter comparison is [READS-368.md](../runtime/READS-368.md). With native execution disabled, GC WM performance improves 1.010× over 367; Guile still leads WM by 5.01×. All 36 workloads and losses remain included alongside the earlier native comparisons. The ordinary-interpreter comparison is [SCOPES-369.md](../runtime/SCOPES-369.md). With native execution disabled, GC WM performance improves 1.155× over 368; Guile still leads WM by 4.33×. All 36 workloads and losses remain included alongside the earlier native comparisons. The ordinary-interpreter comparison is [BRANCHES-370.md](../runtime/BRANCHES-370.md). With native execution disabled, GC WM performance improves 1.004× over 369; Guile still leads WM by 4.30×. All 36 workloads and losses remain included alongside the earlier native comparisons. The earlier conversion comparison is [MARSHAL-374.md](../native/MARSHAL-374.md). Direct value conversion changes native GC performance 1.036× overall versus retained370/native373; WM gain is 1.078×. Guile leads by 1.26× across all 36 workloads. All 151 native/fallback cases pass under ASan/UBSan and Boehm, plus CLI/default checks. The ordinary interpreter remains measured separately in BRANCHES-370.md. The full 1.5× goal remains unproven; all workloads and losses are included. The equality comparisons for both engines are in [EQUALITY-375.md](../runtime/EQUALITY-375.md). GC WM gains are 1.128× interpreted and 1.136× native. Guile leads by 5.92× across the interpreter suite; Guile leads by 1.21× with native execution. All 36 workloads, both collectors and losses remain included. The full 1.5× goal is still unproven. The earlier native text comparison is [TEXT-376.md](../native/TEXT-376.md). Native text reads gain 1.101x overall versus 375; Guile leads by 1.10x across all 36. All workloads, both collectors and losses remain included. That update kept interpreted execution at the separately measured 375 result. The full 1.5x goal remained unproven. The latest comparison for both engines is [BUDGET-401.md](../runtime/BUDGET-401.md): all 36 workloads, both collectors and 31 retained rounds versus 400. Their unlimited-step aggregate is essentially unchanged: interpreted GC is 0.1% slower and arenas 0.1% faster. Native estimates are within 0.1% of 400, with intervals including parity. No individual case exceeds 5% elapsed regression in this pass; every measured loss remains included. A separate comparison of the original values workload with the default one-million-step budget improves by 1.396x with GC and 1.250x with arenas. Private forwarding now works when at least two instruction charges remain; near-limit boundaries retain the packet path. This single-case result is kept outside the 36-workload aggregate. Guile still leads interpreted Vile by about 5x overall. Native Vile leads Guile by 1.155x with GC and 1.173x with arenas. The full 1.5x goal remains unmet. Previous comparison: [VALUES-400.md](../runtime/VALUES-400.md), including its known continuation/loop and native regressions. R7RS compatibility and smoke timings remain separate; no full R7RS performance aggregate is claimed.