jolt/test/unit
Yogthos 3cf303578e feat(compile): Phase 2 — native ops + direct calls (fib30 50s -> 0.076s, ~660x)
Two changes unlock native Janet speed in compile mode:

- Hot numeric primitives (+ - * < > <= >=) emit as native Janet SYMBOLS rather
  than the variadic core fns, so Janet's compiler uses its arithmetic/compare
  opcodes. = / not= / quot / rem / mod / division stay as core fns (their
  semantics differ from Janet's). Trade-off: the strict non-number checks are
  relaxed under compilation (documented perf-mode divergence).
- emit-invoke emits a DIRECT call (f arg...) when the callee is a function
  reference (core/local/symbol/fn), instead of wrapping every call in jolt-call.
  jolt-call is kept only for keyword/collection literals in call position
  ((:k m), ({:a 1} :a)) so IFn dispatch still works.

compiled fib(30): 3.4s -> 0.076s (native ceiling), faster than jank's 0.8s.
Updated compiler-test string assertions (core-+ -> +); compile-mode-test gains
native-op + IFn-dispatch cases; README documents compile mode. jpm test green.
2026-06-05 18:00:46 -04:00
..
compiler-test.janet feat(compile): Phase 2 — native ops + direct calls (fib30 50s -> 0.076s, ~660x) 2026-06-05 18:00:46 -04:00
eval-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00
evaluator-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00
interop-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00
lazy-seq-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00
macro-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00
persistent-map-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00
reader-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00
types-test.janet test: restructure into unit / integration / spec layers + shared harness 2026-06-05 00:00:16 -04:00