jolt/test
Dmitri Sotnikov 1873736045
phm/phs: bulk bottom-up HAMT build for the map/set builders (jolt-5vsp) (#154)
into {}, frequencies, group-by, set, into #{} and persistent! all built
their result by folding an immutable assoc/conj per element — each call
rebuilt the O(log32 n) trie path and allocated a fresh wrapper. Add a
one-pass bottom-up HAMT builder (phm-from-pairs) and route the builders
through it, the map/set analog of the pvec bulk build in #153.

phm-from-pairs partitions entries by hash and constructs the bin/array/
collision nodes directly, with the same bin<=16 / array-node>=17 promotion
the incremental path uses — so the trie is byte-identical to one built by
phm-assoc (validated across the size and branching boundaries, including
hash collisions, duplicate keys and the nil key). persistent! map/set and
the set constructor bulk-build; into {} keeps the small-scalar-map-stays-a
-struct rule via bulk-map-from-pairs; frequencies/group-by switch to the
canonical transient form and ride the fast persistent!.

50k A/B: into {} 704->270ms, frequencies 582->160, set 615->241,
into #{} 702->240, group-by 1358->919 (bound on persistent vector conj).

Gate: conformance x3, full suite (4718 >= baseline), new maps/sets bulk
boundary specs.

Co-authored-by: Yogthos <yogthos@gmail.com>
2026-06-16 22:24:38 +00:00
..
bench Parallelize the test gate; cache cold-init tests, drop the benchmark from it (#139) 2026-06-16 14:23:02 +00:00
clojure-stdlib/clojure Compiler research (#10) 2026-06-09 07:30:25 +08:00
fixtures/cgen-build cgen: single-binary native build via jolt cgen-build (jolt-a7ds) (#150) 2026-06-16 20:34:10 +00:00
integration jolt.png: host PNG encoder + overlay, render mandelbrot/raytracer demos (#152) 2026-06-16 21:07:10 +00:00
spec phm/phs: bulk bottom-up HAMT build for the map/set builders (jolt-5vsp) (#154) 2026-06-16 22:24:38 +00:00
support core: AOT context image — init-cached recovers the bootstrap cost across processes 2026-06-10 13:57:37 -04:00
unit Persistent hash map: HAMT instead of O(n) copy-on-write (jolt-684u) (#136) 2026-06-16 05:01:22 +00:00