compile-fn now keys the .so on a hash of the generated C + the Janet ABI + the platform, in a persistent cache dir (default jolt-cgen under TMPDIR, override with JOLT_CGEN_CACHE_DIR; JOLT_CGEN_NO_CACHE=1 forces a rebuild). cc runs only on the first build of a given fn; later runs with the same source reuse the cached .so, so the per-startup compile cost is paid once. mandelbrot 100 whole-process wall: cold ~0.71s -> warm ~0.21s (the ~0.5s cc cost). These cache knobs don't shape output, so they stay out of ctx-shaping-env-vars (same as the image-cache knobs). Test asserts the .so is content-addressed and a second compile hits the cache without the source .c. Co-authored-by: Yogthos <yogthos@gmail.com> |
||
|---|---|---|
| .. | ||
| bench | ||
| clojure-stdlib/clojure | ||
| integration | ||
| spec | ||
| support | ||
| unit | ||