vile / bench / runtime / READS-368.md
71 lines · 57 sloc · 6.59 KB · 76646891b77a3d5c6af4a1e42b122cd61dc1654b
Raw

Ordinary primitive reads (368)

Valid ordinary primitive reads avoid argument slicing and the general primitive/arity dispatchers inside the existing application path. Supported operations are pair access, simple tag predicates, lengths, character-to-integer, string-ref and bytevector-u8-ref. The actual primitive mode, owner, extension state, argument count and operand domain remain checked. Invalid calls, foreign owners, extended primitives, hard-bounded VMs and unspecified pair results retain the original primitive path.

The application still performs its original charge, owner/protocol checks, result publication, stack cleanup and tail return. Dispatch and arithmetic operand fusion are unchanged from retained367. The existing Unicode cursor, UTF-8 decoder, character validation, value constructors and full-width index checks remain authoritative. No opcode, JIT, persistent borrowed pointer, GC dependency or new per-call allocation is added. Control polling still occurs at the original instruction boundaries.

All 131 relevant ordinary-interpreter cases and 147 native/fallback cases pass under ASan/UBSan and Boehm, plus CLI and default-build budget checks. Four new read tests compare ordinary execution against the hard-bounded VM’s independent full primitive path, including results, errors, source locations and exact virtual charges at every budget from 0 through 47. Cases cover Unicode cursor mutation, large indexes, aliases and binding changes, both frontends, foreign ownership and GC roots.

All 36 unchanged workloads are included: 24 runtime and 12 mock-WM, retained367 and candidate368 interpreters in GC and arena modes, plus Guile 3.0.10 with frozen guild-O2 wrappers and default JIT. Ten fresh processes per configuration/workload give nine retained process samples. All 1800 checked rows pass their oracles and have zero Vile warmup/measured native entry, compilation and cache counters. Builds and tests were separate from timings on the same idle Intel Mac mini using hash-verified snapshots. Prepared per-call medians exclude parsing, setup and first use; raw first-call and whole-process times remain available.

All eight 4-versus-400-call scaling groups pass with three repeats per count and at least 20x total-time growth. Fixtures, four-input oracles, batches and five warmup calls are unchanged. Three rejected dispatch/fusion experiments remain archived separately with all source and losses: validation/interpreter368-initial-trial, interpreter368-outlined-trial and interpreter368-isolated-trial. The current change operates inside application and removes those read hooks from dispatch.

Suite GC gain vs367 Arena gain vs367 Guile advantage over GC Guile advantage over arena
wm 1.010x 1.008x 5.008x 5.300x
runtime 1.045x 1.054x 7.560x 7.746x
all36 1.033x 1.038x 6.591x 6.826x

Guile advantage is Vile time divided by Guile time: above one means Guile is faster. All 36 gives every workload equal weight. Guile still leads; the full 1.5x-faster goal is unmet and final 31-sample/full-objective verification remains outstanding. This report measures the interpreter; previous native-backend comparisons keep their own source snapshots.

Regressions over 5%: {'suite': 'runtime', 'name': 'callcc-escape-1k', 'mode': 'arena', 'elapsed_ratio': 1.054325384711057}. All losses remain in the tables and aggregates.

The primary nine-sample arena continuation-escape row is 5.4% slower. A separate 31-retained-process follow-up with the same fixture, batch and five configurations measures an arena elapsed-time ratio of 1.036176 (3.6% slower) and GC ratio 0.999301 (essentially unchanged). The tradeoff remains reported alongside the full-suite gains; none of the primary rows or aggregates is replaced.

wm

Workload 367 GC ms 368 GC ms Guile ms GC gain Arena gain
wm-callback-chain 5.168925 5.148870 0.640250 1.004x 1.011x
wm-event-dispatch 3.989957 3.971153 0.215000 1.005x 0.988x
wm-focus-cycle 4.732281 4.751115 0.378000 0.996x 0.994x
wm-tiling-layout 2.721528 2.730314 0.109000 0.997x 0.988x
wm-workspace-move 1.493189 1.492045 0.174000 1.001x 0.997x
wm-keybindings 4.629380 4.636818 0.280250 0.998x 1.003x
wm-hooks 3.321496 3.047524 0.355250 1.090x 1.094x
wm-lifecycle 1.137508 1.113881 0.126500 1.021x 1.009x
wm-macro-config 4.542352 4.514074 5.233500 1.006x 1.009x
wm-config-load-tree 5.208424 5.196219 8.961750 1.002x 1.003x
wm-reload-live 8.250224 8.257371 8.088500 0.999x 1.013x
wm-session-replay 7.824326 7.821370 8.039000 1.000x 0.997x

runtime

Workload 367 GC ms 368 GC ms Guile ms GC gain Arena gain
tail-sum-10k 0.708804 0.702374 0.033640 1.009x 0.981x
fib-20 4.527419 4.512044 0.311390 1.003x 1.012x
closure-5k 0.540054 0.540752 0.015560 0.999x 1.021x
list-3k 1.067412 0.900339 0.060080 1.186x 1.208x
flonum-sum-2k 0.484920 0.505478 0.095083 0.959x 1.001x
bignum-fib-200 0.048363 0.048697 0.005333 0.993x 1.002x
rational-harmonic-80 0.094555 0.095240 0.049000 0.993x 0.993x
integer-divmod-5k 0.839500 0.830951 0.167833 1.010x 1.005x
list-map-1k 0.130702 0.129801 0.048333 1.007x 1.009x
list-reverse-2k 0.637599 0.457685 0.060750 1.393x 1.463x
vector-update-2k 0.378860 0.379301 0.016167 0.999x 1.017x
bytevector-fill-4k 0.791857 0.783697 0.086083 1.010x 0.982x
hashtable-count-1k 0.433097 0.440249 5.949000 0.984x 0.987x
string-build-1k 0.040841 0.042484 0.042500 0.961x 0.987x
string-scan-4k 0.898277 0.650979 0.043750 1.380x 1.435x
unicode-scan-1k 0.241219 0.175732 0.011750 1.373x 1.398x
datum-read-write-200 1.211594 1.195339 2.274125 1.014x 1.013x
closure-mutate-2k 0.293241 0.290834 0.008417 1.008x 1.012x
higher-order-2k 0.375771 0.377225 0.006333 0.996x 1.026x
callcc-escape-1k 0.072263 0.072483 0.006667 0.997x 0.948x
values-consumer-1k 0.610009 0.613895 0.004417 0.994x 0.989x
dynamic-wind-200 0.140447 0.141229 0.012583 0.994x 1.010x
goops-dispatch-1k 0.745576 0.751757 0.109125 0.992x 1.006x
goops-allocate-200 0.099980 0.100648 0.054750 0.993x 0.993x

Build snapshot: vile-resume.z2e642t8. Verification: vile-resume.97utd7_s. Measurement: vile-resume.rcnvbdwk. Recovery: validation/interpreter368/.