#299 fasl-load is ~100x SLOWER than source-load (alexandria 60s vs 0.6s) — AG-LOADER-PAD-TO-OFFSET-WALK 32% + 1 MiB fasl buffer cap
closedMeasured on the ADR-0030 Model A fasls (matched 16-file alexandria subset, 3 runs each): SOURCE load 0.60-0.62s; FASL load 59-62s. perf on one fasl load: AG-LOADER-PAD-TO-OFFSET-WALK 32% self (byte-at-a-time 0x90 push reproducing the COMPILE-session arena offset of every CO — alexandria COs sit at multi-MB offsets, so each fasl pads megabytes of NOPs one recursive call per byte, compounding across fasls), then AG-IMAGE-READ-U32 8% (byte-stream readers), AG-FN-IDX-HASH-WALK 6.6%. Fixes, in value order: (1) with KINDs 1-6 + fn/value/quote patches, fasl-produced COs may no longer NEED the pad at all — every reference is a recorded reloc, so pack COs back-to-back and drop the layout replay (verify no direct-patched intra-CO rel32 remains on the fasl-compile path; that was the .fco bundle's constraint, not necessarily the fasl's); (2) if padding must stay, bulk-fill via %mem-copy/rep-stosb instead of byte-vector-push per byte; (3) u32/u64 stream readers via %mem-ref. ALSO: ag-load-fasl-action reads the fasl into a FIXED 1 MiB buffer (repl.lisp ~1183) — an asdf.lisp fasl (~1.5-2MB at the observed 2x fasl:source ratio, 727KB source) would TRUNCATE; size the buffer from stat like the boot path (ADR 0029 Open Problem 7 hardening). Until (1)+(buffer) land, fasl-loading asdf is not viable and alexandria fasls lose to source-load 100x.
Fixed (commit above): pack-mode install + KIND-7 resolved-call relocs (flag-gated to fasl-compile; cold build byte-identical) + stat-sized read buffer. Measured: 16-file alexandria fasl load 59-62s -> 0.09-0.11s (~600x), now ~10x FASTER than source-load. Live check: alexandria fasls load into a fresh image and (alexandria:ensure-list 5) => (5).