jolt/test/spec
Yogthos 4f78f6be33 core: seq walks over concrete collections are linear (bench TOTAL -18%)
Reviewing flatiron's morsel batching for applicability turned up something
better hiding under the lazy machinery: every cell over a concrete
collection was produced by slicing the REMAINDER ((tuple/slice c 1) per
element in coll->cells, and rest/next sliced the same way), so any full walk
was O(n^2). mapv over 40k elements took 10.4 SECONDS; a 20k-element
first/rest loop took two.

Cells over indexed collections now walk by INDEX (one shared indexed-cells
helper, O(1) per step), and rest/next of a vector/tuple/list return an O(1)
lazy view from index 1 — which also makes (rest [1 2 3]) a SEQ, as in
Clojure (it was a vector-typed slice; seq?/vector? rows pin the change).

mapv 40k: 10405 -> 182 ms. rest-loop 20k: 2040 -> 31 ms. Whole bench:
seq-pipe -28%, into-vec -24%, str-join -18%, hof -26%, TOTAL 4565 -> 3753
(-18% vs main, back to back). Chunked seqs (jolt-yqc) drop in priority:
the quadratic walks were the actual cost; chunking now only amortizes
per-element closure allocation.

Nine regression rows incl. 20k/50k linear-scaling smoke tests. Gate exit 0.
2026-06-10 18:56:19 -04:00
..
control-flow-spec.janet Compiler research (#10) 2026-06-09 07:30:25 +08:00
core-async-spec.janet feat: core.async Phase 3 — channel transducers + dropping/sliding buffers 2026-06-05 15:40:24 -04:00
destructuring-spec.janet Stage2 compile only (#12) 2026-06-09 14:20:38 -04:00
exceptions-spec.janet Compiler research (#10) 2026-06-09 07:30:25 +08:00
forms-spec.janet Jank derived spec tests (#17) 2026-06-10 09:39:33 +08:00
functions-spec.janet evaluator: recur into a variadic arity binds the rest seq directly (fixes the hang) 2026-06-10 18:23:13 -04:00
futures-spec.janet spec: rows for every untested var (131 -> 0); the probes found five real bugs 2026-06-10 17:52:30 -04:00
hierarchy-spec.janet core: Stage 3 — the hierarchy system is pure Clojure (canonical port) 2026-06-10 13:19:05 -04:00
host-interop-spec.janet Compiler research (#10) 2026-06-09 07:30:25 +08:00
inst-spec.janet core: #inst instant values + syntax-quote literal collapse (spec 2.3/2.4) 2026-06-10 12:19:23 -04:00
io-spec.janet core: Stage 3 — the *in* reader family is Clojure (50-io tier) 2026-06-10 14:52:40 -04:00
lazy-seqs-spec.janet test: fold phase ports into spec; promote compile-mode test 2026-06-05 01:07:09 -04:00
lists-spec.janet test(spec): collections contract (sequences, vectors, lists, maps, sets) 2026-06-05 00:08:37 -04:00
macros-spec.janet core: spec 35-var batch A — 1.11 parsers, map/partition variants, with-redefs, ns fns 2026-06-10 11:16:54 -04:00
maps-spec.janet core: staged recompile for early defns; keys/vals/empty? leave the seed (jolt-4j3) 2026-06-10 16:16:23 -04:00
metadata-spec.janet Compiler research (#10) 2026-06-09 07:30:25 +08:00
missing-vars-spec.janet core: the last seven missing-portable vars — coverage gap closed (jolt-brh) 2026-06-10 17:22:28 -04:00
multimethods-spec.janet test: fold phase ports into spec; promote compile-mode test 2026-06-05 01:07:09 -04:00
namespaces-spec.janet core: one alias store (jolt-ark); '.' classified as the special form it is 2026-06-10 18:37:19 -04:00
nrepl-spec.janet feat(nrepl): nREPL server + client in Clojure on a Janet interop bridge 2026-06-05 21:25:23 -04:00
ns-var-spec.janet core: *ns* — the current-namespace dynamic var 2026-06-10 13:05:15 -04:00
numbers-spec.janet core: spec 35-var batch A — 1.11 parsers, map/partition variants, with-redefs, ns fns 2026-06-10 11:16:54 -04:00
predicates-spec.janet core: Stage 3 turn 2a — close the implicit Janet root-env leak 2026-06-10 12:43:08 -04:00
protocols-spec.janet test: fold phase ports into spec; promote compile-mode test 2026-06-05 01:07:09 -04:00
reader-forms-spec.janet core: #inst instant values + syntax-quote literal collapse (spec 2.3/2.4) 2026-06-10 12:19:23 -04:00
reader-syntax-spec.janet reader: feature set #{:jolt :default}, clause-order matching (RFC 0002) 2026-06-10 11:40:06 -04:00
regex-spec.janet Comprehensive spec (#19) 2026-06-10 20:33:22 +08:00
sequences-spec.janet core: seq walks over concrete collections are linear (bench TOTAL -18%) 2026-06-10 18:56:19 -04:00
sets-spec.janet core: Stage 3 — sorted collections are pure Clojure (canonical port) 2026-06-10 14:39:02 -04:00
sorted-spec.janet core: Stage 3 — sorted collections are pure Clojure (canonical port) 2026-06-10 14:39:02 -04:00
stage3-io-ns-spec.janet core: edn :readers/:default opts; uncaught throws no longer leak the callee's ns 2026-06-10 18:16:06 -04:00
state-spec.janet test: fold ported-clojure batteries into spec 2026-06-05 07:50:16 -04:00
strings-spec.janet Compiler research (#10) 2026-06-09 07:30:25 +08:00
transducers-spec.janet fix: transducers/reduce short-circuit over infinite seqs via reduced 2026-06-05 09:18:35 -04:00
transients-spec.janet feat(strictness): subs validates bounds; assoc! bounds-checks vector index 2026-06-05 14:07:14 -04:00
truthiness-spec.janet test: fold ported-clojure batteries into spec 2026-06-05 07:50:16 -04:00
untested-vars-spec.janet spec: rows for every untested var (131 -> 0); the probes found five real bugs 2026-06-10 17:52:30 -04:00
uuid-spec.janet core: proper uuid support — fix random-uuid, add parse-uuid, real uuid values 2026-06-10 10:27:24 -04:00
vectors-spec.janet Compiler research (#10) 2026-06-09 07:30:25 +08:00