vile / bench / runtime / INDEX-388.md
69 lines · 56 sloc · 6.28 KB · 76646891b77a3d5c6af4a1e42b122cd61dc1654b
Raw

Native entry fixed-array bounds (388)

Targeted fixed-array accesses in native entry use the capacities already proved by graph/layout admission: eight arguments, 32 providers and 1024 captures. The writable-capture helper loads a checked lexical cell into a local before storing it in fixed storage. Dynamic VM array access, ownership/provider/binding guards, capture alias validation, transaction commit/rollback and cleanup remain in place. No function-wide unchecked-array annotation, new allocation, persistent environment reference, ABI change or compiler/standard-library edit is added.

Four new boundary tests pass on the unchanged 387 baseline and candidate under sanitizer and Boehm: 8/9 arguments, 32/33 graph nodes, 1024/1025 capture reads and full-prefix cleanup, plus the highest writable capture index 1023 with post-scope GC observation. Oversized graphs/inputs preserve the full VM path. This performance-only change claims no functional baseline failure. Candidate validation passes all 234 native cases per mode, two CLI cases and the default-build budget check; per-group raw logs and hashes are retained.

Only native-gated production files change. Ordinary runtime source is identical to retained 387; its existing interpreted comparison remains the latest ordinary result. No new ordinary speedup or repeated ordinary full gate is claimed. Actual kept C and assembly for both native production drivers remove fixed-index calls from entry and capture preparation while preserving dynamic access and allocation calls.

The native comparison keeps all 24 runtime and 12 mock-WM workloads, both collectors, frozen four-input oracles, batches, five warmups, guild-O2/default-JIT Guile 3.0.10 wrappers, and 31 retained samples after excluding sample zero. The uniform sample count was declared before this candidate was timed because earlier closure results were bimodal. All 5,760 observations have correct results. The 144 cold preparations run separately; measured/warmup compilation is zero. All 46 scaling groups pass 4 versus 400 calls with three repeats and at least 20x growth. All 2,304 before/after native hit/deopt pairs match. Builds, tests, preparation and timings run serially from hash-verified snapshots under the shared Mac lock, with idle checks before timings. R7RS first-use measurements remain separate.

Ratios above one favor candidate or Vile respectively. Suite aggregates are equal-weight geometric means. All workloads and losses remain included. This candidate is retained after the complete comparison and verification. The full 1.5x goal remains unmet; this result is below that threshold.

Suite GC gain vs387 Arena gain vs387 Guile/Vile GC Guile/Vile arena
wm 1.005x 1.020x 0.641x 0.640x
runtime 1.010x 1.000x 1.200x 1.219x
all36 1.008x 1.007x 0.974x 0.983x

The 95% paired-round bootstrap intervals for all 36 are GC gain 1.001–1.012x, arena gain 1.005–1.010x, Guile/Vile GC 0.968–0.976x and Guile/Vile arena 0.982–0.985x. The analysis uses 2,000 deterministic resamples (seed 388031), pairing variant observations by sample round within each fixed workload. It estimates observed process variation, not performance on unseen programs; it changes no primary medians or workload weights.

Regressions above 5%: runtime/bytevector-fill-4k (arena, 1.065x elapsed); runtime/string-scan-4k (arena, 1.057x elapsed). All remain included.

wm

Workload 387 GC ms 388 GC ms Guile ms GC gain Arena gain
wm-callback-chain 0.476954 0.484407 0.638500 0.985x 1.010x
wm-event-dispatch 0.820894 0.819919 0.216000 1.001x 1.034x
wm-focus-cycle 0.476177 0.485214 0.377250 0.981x 1.019x
wm-tiling-layout 0.258317 0.267829 0.109250 0.964x 1.016x
wm-workspace-move 0.189671 0.193017 0.173750 0.983x 1.014x
wm-keybindings 0.972128 0.950764 0.284000 1.022x 1.029x
wm-hooks 2.287580 2.048610 0.355250 1.117x 1.113x
wm-lifecycle 0.880864 0.873353 0.127500 1.009x 1.006x
wm-macro-config 4.413375 4.407650 5.291500 1.001x 1.011x
wm-config-load-tree 4.653452 4.649938 9.017500 1.001x 0.990x
wm-reload-live 4.824467 4.829959 8.123000 0.999x 1.006x
wm-session-replay 4.891193 4.879675 8.066250 1.002x 0.994x

runtime

Workload 387 GC ms 388 GC ms Guile ms GC gain Arena gain
tail-sum-10k 0.005606 0.005606 0.033720 1.000x 1.000x
fib-20 0.146975 0.147004 0.310920 1.000x 1.005x
closure-5k 0.002195 0.002201 0.015570 0.997x 1.001x
list-3k 0.007225 0.007203 0.060030 1.003x 1.001x
flonum-sum-2k 0.002373 0.002373 0.095667 1.000x 1.000x
bignum-fib-200 0.043095 0.043257 0.005500 0.996x 1.005x
rational-harmonic-80 0.104065 0.103767 0.049500 1.003x 0.995x
integer-divmod-5k 0.007926 0.007916 0.168083 1.001x 1.000x
list-map-1k 0.131013 0.125881 0.048583 1.041x 1.054x
list-reverse-2k 0.068516 0.066767 0.060667 1.026x 1.003x
vector-update-2k 0.060598 0.062165 0.016167 0.975x 1.040x
bytevector-fill-4k 0.083431 0.078609 0.086167 1.061x 0.939x
hashtable-count-1k 0.459954 0.462165 6.014667 0.995x 1.003x
string-build-1k 0.045344 0.045234 0.043083 1.002x 1.000x
string-scan-4k 0.095204 0.088783 0.043750 1.072x 0.946x
unicode-scan-1k 0.036499 0.035595 0.011750 1.025x 0.976x
datum-read-write-200 1.587698 1.569093 2.278125 1.012x 1.011x
closure-mutate-2k 0.002914 0.002820 0.008417 1.034x 1.025x
higher-order-2k 0.004091 0.004080 0.006333 1.003x 1.001x
callcc-escape-1k 0.094711 0.095015 0.006583 0.997x 0.997x
values-consumer-1k 0.001549 0.001556 0.004417 0.995x 1.000x
dynamic-wind-200 0.148800 0.149180 0.012667 0.997x 1.000x
goops-dispatch-1k 0.783753 0.779560 0.110375 1.005x 1.002x
goops-allocate-200 0.086039 0.085572 0.054875 1.005x 1.004x

Build: vile-resume.igmxkl1a. Verification: vile-resume.mrgoum3z. Measurement/preparation: vile-resume.abyhvanl. Baseline: vile-resume.klwkt2yn/frame387/native.