vile / bench / runtime / EQUALITY-375.md
125 lines · 106 sloc · 8.82 KB · 76646891b77a3d5c6af4a1e42b122cd61dc1654b
Raw

Equality without temporary graph storage for leaf pairs (375)

Plain equality skips visited-table and pending-cdr allocation when both operands are pairs and all four fields are neither pairs nor vectors. Identity still wins first, including a pair containing NaN. Leaf comparisons reuse the original nonrecursive cursor algorithm, so string/byte contents, numeric and opaque-value semantics stay shared. Other graphs retain the original walk.

The initial visited table uses the existing filled_storage API, as table growth already did. Actual optimized disassembly in both engines has no generic array-set calls in table insertion or the cursor; cached closure entry and operand fusion stay inline. Extensible GOOPS comparisons keep their callback, delayed reads and continuation protocol. No new GC dependency or persistent borrowed storage is introduced.

All 52 focused graph/control cases pass with ASan/UBSan and Boehm. Five new regressions cover a broad leaf-domain matrix against the independent original walker, pair identity, cycles and sharing, mutation, readonly graph literals, long lists, association/member results and both frontends, 2000 comparisons without additional arena storage, and a GOOPS pair callback that mutates its cdr and resumes after GC. Broader checks pass all 262 ordinary and 151 native/fallback cases per mode, plus CLI and default-build budget checks.

Interpreter and native comparisons use separate complete 36-workload datasets on the same idle Intel Mac mini: 24 runtime and 12 mock-WM cases, both collectors, unchanged retained baselines and Guile 3.0.10 with frozen guild-O2 wrappers/default JIT. Each dataset has 1800 fresh-process rows, with sample zero excluded and nine samples retained. All four-input oracles, batch sizes and warmup counts are unchanged. Interpreter native/deopt/compile/cache counters are zero. Native cache population ran in a separate job with 144 cold observations; all 1440 native comparison processes compiled zero sources in warmup and measurement.

All eight interpreter and 32 native scaling groups pass 4 versus 400 calls, three repeats and at least 20x time growth. Builds, tests, cache population and comparisons ran serially from hash-verified snapshots. Prepared medians exclude initial setup/first use; repeated loading and macro work inside workloads are included. All raw first-call/process times, workloads and losses are preserved.

Guile/Vile ratios above one favor Vile. Every workload has equal weight in all36. The goal of being 1.5x faster remains unproven; final 31-sample/full-objective verification is outstanding. Native and interpreted results remain distinct.

interpreter

Suite GC gain Arena gain Guile/Vile GC Guile/Vile arena
wm 1.128x 1.150x 0.261x 0.259x
runtime 1.002x 1.001x 0.136x 0.134x
all36 1.042x 1.048x 0.169x 0.166x

Regressions above 5%: none. All losses remain included.

wm

Workload Before GC ms After GC ms Guile ms GC gain Arena gain
wm-callback-chain 4.660136 4.651338 0.638000 1.002x 1.000x
wm-event-dispatch 2.820618 2.821563 0.215000 1.000x 1.000x
wm-focus-cycle 4.130002 4.132492 0.377500 0.999x 0.992x
wm-tiling-layout 1.776679 1.777081 0.108500 1.000x 1.001x
wm-workspace-move 1.249143 1.246658 0.173500 1.002x 1.001x
wm-keybindings 4.366293 1.137929 0.282250 3.837x 4.655x
wm-hooks 2.825589 2.820251 0.354250 1.002x 0.997x
wm-lifecycle 0.993909 0.993445 0.125250 1.000x 0.997x
wm-macro-config 4.442710 4.435599 5.251500 1.002x 0.996x
wm-config-load-tree 5.123969 4.957991 8.999250 1.033x 1.094x
wm-reload-live 7.108139 7.075066 8.108250 1.005x 1.019x
wm-session-replay 6.790189 6.445131 8.081750 1.054x 1.044x
### runtime
Workload Before GC ms After GC ms Guile ms GC gain Arena gain
tail-sum-10k 0.666359 0.662679 0.033660 1.006x 1.008x
fib-20 4.842875 4.779777 0.310670 1.013x 1.000x
closure-5k 0.525075 0.527706 0.015590 0.995x 1.002x
list-3k 0.895425 0.890972 0.060140 1.005x 1.000x
flonum-sum-2k 0.482549 0.493986 0.096167 0.977x 0.998x
bignum-fib-200 0.047605 0.047044 0.005417 1.012x 1.004x
rational-harmonic-80 0.095022 0.094724 0.049125 1.003x 1.003x
integer-divmod-5k 0.819643 0.820792 0.169167 0.999x 0.994x
list-map-1k 0.117021 0.116027 0.048583 1.009x 1.012x
list-reverse-2k 0.476141 0.467609 0.060833 1.018x 1.002x
vector-update-2k 0.375933 0.376961 0.016167 0.997x 1.006x
bytevector-fill-4k 0.745943 0.743272 0.086167 1.004x 1.002x
hashtable-count-1k 0.434458 0.435986 6.001500 0.996x 0.996x
string-build-1k 0.041619 0.041693 0.042833 0.998x 0.991x
string-scan-4k 0.646722 0.647333 0.043833 0.999x 0.997x
unicode-scan-1k 0.174342 0.173171 0.011750 1.007x 0.995x
datum-read-write-200 1.196195 1.186392 2.227500 1.008x 1.020x
closure-mutate-2k 0.288836 0.288410 0.008417 1.001x 0.996x
higher-order-2k 0.368064 0.371777 0.006333 0.990x 1.001x
callcc-escape-1k 0.067742 0.068657 0.006667 0.987x 1.002x
values-consumer-1k 0.599385 0.597290 0.004417 1.004x 1.002x
dynamic-wind-200 0.140732 0.140515 0.012667 1.002x 0.990x
goops-dispatch-1k 0.751730 0.746734 0.109000 1.007x 1.006x
goops-allocate-200 0.082453 0.081464 0.054625 1.012x 1.001x

native

Suite GC gain Arena gain Guile/Vile GC Guile/Vile arena
wm 1.136x 1.164x 0.563x 0.557x
runtime 1.006x 1.002x 1.005x 1.028x
all36 1.047x 1.053x 0.829x 0.838x

Regressions above 5%: none. All losses remain included.

wm

Workload Before GC ms After GC ms Guile ms GC gain Arena gain
wm-callback-chain 0.446661 0.455251 0.642000 0.981x 0.994x
wm-event-dispatch 0.820987 0.829330 0.220000 0.990x 0.989x
wm-focus-cycle 0.452130 0.456974 0.376000 0.989x 0.998x
wm-tiling-layout 0.242152 0.246923 0.108750 0.981x 0.973x
wm-workspace-move 0.984528 0.975683 0.173250 1.009x 1.005x
wm-keybindings 4.273949 0.978394 0.280250 4.368x 5.395x
wm-hooks 2.156276 2.186497 0.359000 0.986x 1.000x
wm-lifecycle 0.874435 0.874955 0.124750 0.999x 1.002x
wm-macro-config 4.409506 4.422885 5.272250 0.997x 0.979x
wm-config-load-tree 4.989972 4.651010 8.986500 1.073x 1.103x
wm-reload-live 4.853241 4.863353 8.126250 0.998x 1.014x
wm-session-replay 5.156803 4.890733 8.056500 1.054x 1.091x
### runtime
Workload Before GC ms After GC ms Guile ms GC gain Arena gain
tail-sum-10k 0.005608 0.005606 0.033670 1.000x 1.000x
fib-20 0.146836 0.146790 0.310670 1.000x 1.000x
closure-5k 0.002692 0.002129 0.015570 1.264x 1.022x
list-3k 0.007219 0.007220 0.059710 1.000x 1.000x
flonum-sum-2k 0.002375 0.002374 0.095583 1.000x 1.001x
bignum-fib-200 0.057232 0.056853 0.005417 1.007x 1.005x
rational-harmonic-80 0.103036 0.103643 0.049750 0.994x 1.005x
integer-divmod-5k 0.007923 0.007918 0.167750 1.001x 1.000x
list-map-1k 0.134201 0.133893 0.048500 1.002x 1.006x
list-reverse-2k 0.067046 0.068357 0.060833 0.981x 0.994x
vector-update-2k 0.055137 0.056533 0.016167 0.975x 1.019x
bytevector-fill-4k 0.079621 0.080512 0.086167 0.989x 0.965x
hashtable-count-1k 0.460931 0.460931 5.922750 1.000x 0.996x
string-build-1k 0.047753 0.047546 0.042833 1.004x 1.006x
string-scan-4k 0.753068 0.758164 0.043750 0.993x 1.007x
unicode-scan-1k 0.201315 0.203151 0.011750 0.991x 1.004x
datum-read-write-200 1.561995 1.568739 2.247000 0.996x 0.989x
closure-mutate-2k 0.002901 0.002897 0.008417 1.001x 1.003x
higher-order-2k 0.004062 0.004088 0.006333 0.994x 1.000x
callcc-escape-1k 0.091891 0.093508 0.006667 0.983x 1.002x
values-consumer-1k 0.001551 0.001546 0.004417 1.003x 1.001x
dynamic-wind-200 0.149803 0.150351 0.012667 0.996x 1.006x
goops-dispatch-1k 0.790177 0.790951 0.110250 0.999x 1.007x
goops-allocate-200 0.085470 0.085670 0.054875 0.998x 1.000x

Build: vile-resume.qhtmp3yb. Verification: vile-resume.lzglv1eg. Interpreter measurement: vile-resume.qiyp8f0w. Native measurement: vile-resume.qtqc3llf. Recovery: validation/equality375/.