jolt/spike/native
Dmitri Sotnikov a2ce6bb5f6
Spike: native codegen (lever 1) feasibility for jolt-5vsp (#144)
Probes the ceiling and incremental strategy for compiling hot fns to native C,
the only lever that moves the ~10.8x Janet-VM floor the localization spike found.

Native-C mandelbrot (Janet native module) runs ~10-12ms — faster than JVM
Clojure (14.2ms) and ~18-22x faster than jolt's 219ms. The boundary cost is
asymmetric: a bytecode loop calling a C hot-fn 40k times is nearly free (~11ms),
but a C fn calling back into bytecode via janet_call costs ~3.5us/call (~152ms,
no win). So the strategy is leaf-first / whole-hot-cluster compilation, crossing
only at cold edges. A plain cc-built .so (no jpm) loads at runtime via require at
full speed, so the native tier fits jolt's dynamic compile model.

Adds the spike artifacts under spike/native/ and the writeup. Next step is
jolt-ihdp (IR->C for the numeric subset). No source changes.

Co-authored-by: Yogthos <yogthos@gmail.com>
2026-06-16 16:30:17 +00:00
..
bench-native.janet Spike: native codegen (lever 1) feasibility for jolt-5vsp (#144) 2026-06-16 16:30:17 +00:00
mandel.c Spike: native codegen (lever 1) feasibility for jolt-5vsp (#144) 2026-06-16 16:30:17 +00:00
project.janet Spike: native codegen (lever 1) feasibility for jolt-5vsp (#144) 2026-06-16 16:30:17 +00:00