docs: serving-JIT handoff (from sx-vm-extensions) + host-loop correction
Carry the sx-vm-extensions loop's serving-JIT handoff notes, and add a
correction: the post-page slowness was the durable read count (fixed in
0a2f1a61), not the (long-gone) Smalltalk render path — so SX_SERVING_JIT is an
optional general speedup, not the perf blocker.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -425,3 +425,31 @@ Swap `host/blog-open-create-routes` → `host/blog-write-routes <resolver>` to g
|
||||
here even `sx_write_file` fails. Read-side sx-tree tools work. New `.sx` files
|
||||
were created with the `Write` tool (the .sx hook is inactive in this worktree)
|
||||
and each validated afterwards with `sx_validate` to keep the parse guarantee.
|
||||
|
||||
## Action item — serving-JIT speedup is NOT a code merge; it's a one-line flag flip
|
||||
|
||||
The ~2s interpreted-Smalltalk render (`/welcome/`, blog post pages) is being fixed
|
||||
by the **`sx-vm-extensions`** loop — the JIT-bytecode-correctness handoff we kicked
|
||||
off on 2026-06-19. **Do not wait for a code merge into `lib/host/**`** — the fix
|
||||
lives entirely in the shared kernel (`hosts/ocaml/**`: `sx_server.ml`, `sx_vm.ml`,
|
||||
extension modules) + shared guest runtimes (`lib/smalltalk/eval.sx`,
|
||||
`lib/compiler.sx`, `lib/*/runtime.sx`). None of it is host code. The speedup is a
|
||||
property of the shared `sx_server.exe` binary every loop already runs.
|
||||
|
||||
The serving-mode JIT is **gated behind `SX_SERVING_JIT`** (vm-ext commit
|
||||
`bf298684`), and host's `serve.sh` / `conformance.sh` currently do **not** set it.
|
||||
So host's entire adoption step is:
|
||||
|
||||
1. Wait for `sx-vm-extensions` → `architecture` (kernel + guest-runtime merge) and
|
||||
the rebuilt shared binary. Watch its scoreboard: serving-JIT must be green across
|
||||
ALL guest suites (Smalltalk, Datalog, Scheme, Haskell, Erlang, Prolog, APL, js)
|
||||
with `SX_SERVING_JIT=1` — already done as of vm-ext `fed58b28` (js 148/148).
|
||||
2. Gate locally: run `SX_SERVING_JIT=1 bash lib/host/conformance.sh` against the
|
||||
rebuilt binary. Must stay green — this is the exact suite that first exposed the
|
||||
miscompile (`router 3/6, feed 4/11, relations 9/16, blog 4/11` with the old JIT
|
||||
on). If green, the residual exclusions in vm-ext covered host's workload.
|
||||
3. Flip it on live: add `export SX_SERVING_JIT=1` to `lib/host/serve.sh` (the one
|
||||
in-scope `lib/host/**` change). Commit as a feature. Live render should drop from
|
||||
~2s to tens of ms — highest-leverage perf win on the platform.
|
||||
|
||||
Until step 1's binary is in, this is a no-op — leave `serve.sh` as is.
|
||||
|
||||
Reference in New Issue
Block a user